Using /api/v2/analytics/reporting/exports

Am getting up to speed on reporting through the APIs using the Developer Tools API explorer but with limited success.
I'm trying to export information about user states especially presence, status and secondary statuses.
This API alludes to the option showSecondaryStatus but using "viewType": "AGENT_STATUS_SUMMARY_VIEW" doesn't show it and I cannot seem to get "viewType": "AGENT_STATUS_DETAIL_VIEW" to work.

e.g.
{
"name": "Test Export3",
"timeZone": "Pacific/Auckland",
"exportFormat": "CSV",
"interval": "2019-10-07T00:00:00.000Z/2019-10-10T00:00:00.000Z",
"viewType": "AGENT_STATUS_DETAIL_VIEW",
"filter": {
"userIds": [
"2a3c2b3e-dca7-4dc0-829c-26616bc99e7a"
],
"showSecondaryStatus": "true"
},
"locale": "en-us"
}

simply returns

{
"status": 400,
"code": "bad.request",
"message": "The requested operation failed with status 400",
"contextId": "f4ce6994-470e-4e10-aa47-0f60bd8fd6a7",
"details": [],
"errors": []
}

I have not got AGENT_STATUS_DETAIL_VIEW to work at all.

Does it work? Can someone look at why my request fails and/or provide a sample request body that will work for AGENT_STATUS_DETAIL_VIEW? Keen to see what it returns.

Please open a case with PureCloud Care to report this issue: The error response from Analytics is not being propagated to the API response. There is an error happening internally that's preventing the actual error message from getting to you.

The error for your request is that the property period is required for this report.

Thanks for that. Off to raise a case.

Period was missing from my request as the developer tools said it was optional.

period

( string, optional ): The Period of the request in which to break down the intervals. Periods are represented as an ISO-8601 string. For example: P1D or P1DT12H

I am learning to take such notes with a pinch of salt.

Having now run this report "AGENT_STATUS_DETAIL_VIEW" and the option "showSecondaryStatus": "true", I'm still not seeing our secondary statuses, just the main ones (as setup in Admin / Account Settings / Organization Settings / Status Management).

Which export viewType's actually take note of "showSecondaryStatus" being set to "true"?

Hi Angus, the agent status detail export does not currently support secondary statuses. showSecondaryStatus does not apply to that particular export. We'll take a look at our docs to make sure they are clear and accurate.

Can you let me know which exports DO support showSecondaryStatus?

None of the exports support showSecondaryStatus. That is part of a different analytics service, used for Saved Views in the PureCloud UI. It should not be in the docs.

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