Obtain all users with a specific current presence

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:

image

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!

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

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

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