cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

How to retrieve ThingWorx Login Audit details

Siddharth_Jhs
14-Alexandrite

How to retrieve ThingWorx Login Audit details

Hi Community,

I need to access following information from ThingWorx Number of users logged in and their time. 

For this I am trying following service: "QueryAuditHistoryWithQueryCriteria" following ptc article: 

https://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/index.html#page/ThingWorx/Help/Composer/System/Subsystems/AuditSubsystemSearchAuditData.html#

Could you all please help me provide correct json input as filter I should provide for same. 

Attaching screenshot for same.

 

json query: 

{
"filters": {
"type": "LIKE",
"fieldName": "Audit",
"value": "Login%"
}
}

Error:  Unable to Invoke Service QueryAuditHistoryWithQueryCriteria on AuditSubsystem : com.thingworx.common.exceptions.DataAccessException: [1,018] Data store unknown error: [Error occurred while accessing the data provider.]

 

Thanks,

Sid

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Siddharth_Jhs 

 

FieldName displayed in the result is a DataShape Friendly name. You can find the actual fieldName by creating DataShape from the result

 

Velkumar_0-1699953312639.png

 

 

/VR

View solution in original post

3 REPLIES 3

Hi @Siddharth_Jhs 

 

Try below query

 

{
    "filters": {
        "type": "And",
        "filters": [
            {
                "fieldName": "message",
                "type": "LIKE",
                "value": "*Login*"
            }
        ]
    }
}

 

/VR

Siddharth_Jhs
14-Alexandrite
(To:Velkumar)

Hi @Velkumar ,

 Thanks it worked. Could you please tell why we are specifying message in fieldName when we don't have this in header received?

 

 

Regards,

Sid

Hi @Siddharth_Jhs 

 

FieldName displayed in the result is a DataShape Friendly name. You can find the actual fieldName by creating DataShape from the result

 

Velkumar_0-1699953312639.png

 

 

/VR

Top Tags