marisa.grasso | 2023-02-27 15:41:09 UTC | #1
Hi,
I using this endpoint: /api/v2/users/search
to try to obtain all the users with a specific presence, is that possible? In the 'Search Query Builder', it is actually possible to select a filter by presence:
but it always returns 0 results, whereas if I search by name of a user, it does return results. I have also tried this without using the query builder, only the endpoint above provided in the API with the following JSON request:
{ "pageSize": 25, "pageNumber": 1, "types": ["users", "groups"], "returnFields": ["guid"], "query": [{ "type": "CONTAINS", "fields": ["presence"], "value": "o" }] }
but it still returns no data. What am I doing wrong?
Many thanks!
tim.smith | 2023-02-27 16:07:08 UTC | #2
Please do not use the legacy dev tools; they're deprecated pending removal. You can construct requests for search endpoints using the new API Explorer tool: POST /api/v2/users/search. You'll notice that presence isn't a searchable field in the current version of the tool (the old tool is incorrect, and unsupported).
To get the presence for many users at once, use a user detail query: POST /api/v2/analytics/users/details/query. https://developer.genesys.cloud/analyticsdatamanagement/analytics/detail/user-query
marisa.grasso | 2023-02-27 16:21:34 UTC | #3
Thanks Tim,
As far as I can see, I need to specify a time interval. If i want to see all the users that are "offline" "right now", what do I specify in the 'interval' field?
Thank you
system | 2023-03-30 16:21:59 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 18619