Javascript response is different from API Explorer

When I run a query for conversation details for a date range, I get different a different response from API Explorer than from a JavaScript call.

"method": "post",
"url": "https://api.mypurecloud.com/api/v2/analytics/conversations/details/query",
"data": {
    "order": "asc",
    "orderBy": "conversationStart",
    "interval": "2024-06-19T10:00:00.000Z/2024-06-19T11:30:00.000Z",
    "conversationFilters": [
        {
            "predicates": [
                {
                    "type": "dimension",
                    "dimension": "conversationEnd",
                    "operator": "exists"
                }
            ],
            "type": "and"
        }
    ]
}

The above is the payload in API explorer and also the Javascript requests. I tried this as the payload in the following:

  • API Explorer
  • Genesys Pure Cloud Javascript SDK
  • Axios
  • Fetch

I'm getting more results for the same daterange in API Explorer. I'm getting less, and the same amongst the other 3 Javascript requests.

Is API explorer doing the query differently?

1 Like

I opened a ticket.

Have you confirmed the requests are actually the same by looking at the request the API Explorer is making by opening the Dev Tools in your browser and going to the Network tab? You can compare that request to the ones being made by Axios, Fetch, or the GCCX JS SDK and see if they are functionally identical.

Also, this may be a dumb question, but does the user you're using in API Explorer have the same level of permissions as the user or client you're using with Axios/Fetch/JS SDK? I believe (I could be mistake) that you can restrict "client credential" OAuth clients to certain divisions if you wanted via their roles (Again, not sure though).

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