Audits Schedule Changes

Hi all,

I try to understand why the POST /api/v2/audits/query with the same parameters doesn't return any data compared tot the POST /api/v2/audits/query/realtime HTTP/1.1.

This is the body on the real time query:
{"interval":"2024-03-11T00:00:00/2024-03-19T23:59:59","serviceName":"Telephony","filters":[{"property":"EntityType","value":"Schedule"}]}

vs the one on the longer time query:
{"interval":"2024-03-01T00:00:00/2024-03-19T23:59:59","serviceName":"Telephony","filters":[{"property":"EntityType","value":"Schedule"}]}

On the latter I would expect more data than on the first one, instead I get back a 202 OK
with this data:
{
"id": "9ac82385-9c0d-46a2-abd2-d7a378964c91",
"state": "Running",
"startDate": "2024-03-19T14:14:48Z",
"interval": "2024-03-01T00:00:00.000Z/2024-03-19T23:59:59.000Z",
"serviceName": "Telephony",
"filters": [
{
"property": "EntityType",
"value": "Schedule"
}
]
}

What am I doing wrong?

HTTP response code 202 means that a job has been started and you will need to wait for results.

You will need to use additional endpoints to get your data.

Pass the ID that is returned as part of the 202 to GET /api/v2/audits/query/{transactionId} to see the status of your job.

Once the job is complete, you can call GET /api/v2/audits/query/{transactionId}/results with the same ID to get the results.

Thanks.
How do I know whether or not the query is completed?

Is there any more documentation on how the API's supposed to work other than what is in the portal, with maybe some examples?

There is an explanation of the difference between a job and query endpoint here with an explanation of the Job lifecycle - https://developer.genesys.cloud/analyticsdatamanagement/analytics/jobs/conversation-details-job

(same info here https://developer.genesys.cloud/analyticsdatamanagement/analytics/jobs/user-job )

Thanks for that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.