API post /api/v2/analytics/users/details/query incomplete

Question, i'm not sure if this is an isolated case or not. But when we call /api/v2/analytics/users/details/query we're not getting the complete list of users. The users are random and please see code below:

import requests
gc_api_url = 'https://api.usw2.pure.cloud'
base = '/api/v2/analytics/users/details/query'
apiurl=gc_api_url + base
gc_access_token = '[API Key here]'
request_headers={'Accept':'application/json','Content-Type': 'application/json','Authorization': 'bearer ' + gc_access_token,}
request_body={ 'interval': '2023-10-01T00:00:00/2023-10-04T00:00:00' }

r = requests.post(apiurl, headers=request_headers, json = request_body)
print(f"{r.json()}")

Results are paginated, you have to cycle through them to get everybody.

See paging spec portion of request body - POST /api/v2/analytics/users/details/query

Thanks for the reference @Eos_Rios. Checking it now. :slight_smile:

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