Colasacco_Pete | 2024-06-17 21:05:51 UTC | #1
Greetings: Looking for some guidance on the /api/v2/audits/query API.
From the API explorer, it seems it should only need
{ "serviceName": "Datatables", "interval": "2024-06-13T00:00:00/2024-06-14T00:00:00", "sort": [ { "name": "Timestamp", "sortOrder": "descending" } ], "filters": [ { "property": "Action", "value": "Update", } ] }
Yet , to attempt to POST this,
Invoke-RestMethod : {"message":"IllegalQueryException [When supplying an action you must also supply entityType]","code":"bad.request","status":400,"contextId":"c8641515-bf17-4321-bd07-963a1e0765ad","details":[],"errors":[]}
Where should the entityType be included (e.g. Row) to get a nice report on what Rows were updated for datatables for a time period? Had previously "Use[d] /api/v2/audits/query/servicemapping endpoint for a list of valid values" to determine Datatables was a service.
Thanks -Pete
siddd0542 | 2024-06-18 06:38:26 UTC | #2
Hi @Colasacco_Pete ,
You can use the following: { "serviceName": "Datatables", "interval": "2024-06-14T00:00:00/2024-06-15T00:00:00", "filters": [ { "property": "EntityType", "value": "Row" }, { "property": "Action", "value": "Update" } ], "sort": [ { "name": "Timestamp", "sortOrder": "ascending" } ] }
Once you get the output you can use the id of the output in the API /api/v2/audits/query/{transactionId}/results and get the details of what you want to see on what changes were made.
Colasacco_Pete | 2024-06-18 15:05:44 UTC | #3
@siddd0542 - Exactly! This worked perfectly! Thank you for answering this!
Regards -Pete
system | 2024-07-18 15:06:38 UTC | #4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 26823