"paging" does not seem to be working for API

I am making HTTP request from Azure function to query for conversation details -
POST https://api.mypurecloud.com/api/v2/analytics/conversations/details/query

In python code in Azure function, here are the details -

data_response = requests.post(api_url, headers=headers, json=query)
where api_url = https://api.mypurecloud.com.au/api/v2/analytics/conversations/details/query
headers = {'Authorization': f'Bearer {token}', 'Content-Type': 'application/json'}
json = query = {'interval': '2023-07-01T00:00:00Z/2023-07-08T00:00:00Z', 'paging': {'pageSize': 100, 'pageNumber': 1}

However PAGING does not seem to be working and response contains all data at once. Please help me in getting data in pages, one at a time.

This is really interesting. I have never seen it where paging was not in place. I ran some tests in the Developer tools and also see that the paging settings are not taking effect. I ran an API query and it returned over 350 results without any paging. I think there must be a change or problem in the API.

@tim.smith - are you aware of this or is this be misunderstood?

Alex Johnson
achieve cx

Hello,

Do you mean that you see a "totalHits" attribute value greater than 100 (your pageSize) in your response - which can be normal if the query filter matches more than 100 conversations?
Or that the "conversations" attribute array contains more than 100 conversations?

If you had more than 100 conversations in your "conversations" attribute array (more than what you defined for pageSize), it is not a correct behavior. If it is the case, please open a ticket with Genesys Cloud Customer Care.

I just tried to run a Conversations Details Query with a pageSize of 5. My "conversations" array did contain 5 conversations, while totalHits was 48 (how many conversations happened in my interval).

Regards,

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