https://cloud.uipath.com/{organization_name}/{tenant_name}/orchestrator_/odata/AuditLogs
I am using UiPath API to fetch audit logs
I want to add filter to a sub level property by ‘key’ “Entities >> CustomData >> Key”
I am looking for something like this:
$filter = Entities.CustomData.Key eq ‘100f0e84-c7ea-4077-b778-802e1200b714’
Attached json file for reference.
I tried Entities/CustomData/Key eq ‘100f0e84-c7ea-4077-b778-802e1200b714’ but its not working
response_1704718.txt (1.6 KB)
ppr
(Peter Preuss)
January 8, 2024, 3:31pm
2
The content of the CustomData is a serialized JSON String
so we cannot access by a Path
Additional the Entities are present within an array, so we would have to look within the different items of the Array
Maybe the combination of a contains, indexOf along with an Any can help for the filtering
rikulsilva
(Henrique Lima da Silva)
January 8, 2024, 4:51pm
3
Hi @Zara_Yasmin
You can try this
https://cloud.uipath.com/{organization_name}/{tenant_name}/orchestrator_/odata/AuditLogs?$filter=Entities/any(e:contains(e/CustomData, '%22Key%22%3A%22100f0e84-c7ea-4077-b778-802e1200b714%22'))
encode your key to url format
From
\"Key\":\"100f0e84-c7ea-4077-b778-802e1200b714\"
to
%22Key%22%3A%22100f0e84-c7ea-4077-b778-802e1200b714%22
Let us know if it works
Cheers
This worked… Thank you so much for your help
1 Like
system
(system)
Closed
January 13, 2024, 6:24am
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.