Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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:
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
Solved! Go to Solution.
FieldName displayed in the result is a DataShape Friendly name. You can find the actual fieldName by creating DataShape from the result
/VR
Try below query
{
"filters": {
"type": "And",
"filters": [
{
"fieldName": "message",
"type": "LIKE",
"value": "*Login*"
}
]
}
}
/VR
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
FieldName displayed in the result is a DataShape Friendly name. You can find the actual fieldName by creating DataShape from the result
/VR