ERROR 504 Gateway Timeout Conversation Details Query

Hi, I am currently working on an AWS development with Genesys Cloud using the Rest API. I test the APIs in the development tools in order to have knowledge of the information and data that are retrieved from the analytics / conversations / details, the drawback is that it only allows me to extract 100 records per page or request, for the client that we are carrying out the development they in an interval of one month have more than 50,000 records found, therefore we would be talking about more than 5000 requests to the API which would affect time and resources for a backend.

From this research I found that in the following link Analytics Conversation Detail Endpoint API query interval change - Genesys Cloud Resource Center for 2020 the API was updated to return up to a total of 100,000 records, but it had to use the Jobs API mentioned below:

/ api / v2 / analytics / conversations / details / jobs

The Body Request used is:
{
"interval": "2021-08-21T00:00:00.000Z/2021-09-21T23:59:59.000Z",
"segmentFilters": [
{
"type": "or",
"predicates":
[
{
"dimension": "purpose",
"value":"agent"
},
{
"dimension":"direction",
"value": "inbound"
}

            ]
    }
],
"order": "asc",
"orderBy": "segmentStart",
"limit": 100000

}

Using the same body for the API of Conversation Details Query as mentioned above, it returns a TotalHits of more than 50000 records, but with this API after generating the JOB and that it is completed, it only returns 1000 records and if the PageSize is placed at 10000 it generates the error 504 Gateway Timeout.

Therefore, we need to know if we are implementing the API incorrectly or is it an inconvenience of the API and to know how to extract the 100,000 records in a single request.

I am attentive to your prompt response

Using the jobs endpoint is the right approach. That requests all data matching the query and caches the results. When you then page through results, you simply page through the cached data without any further queries so the performance is much better than using the query endpoint.
However, if you increase the page size (e.g. to 10,000 as you suggested), that's a lot of data - especially for conversations with many participants. Timeouts may occur (after 10 seconds) because we can't send the data quick enough over the network. That's why the default page size is 1,000. I would suggest just using that.
There is no way to request 100,000 results in a single request.

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