borys.spiridonov | 2022-01-25 23:00:41 UTC | #1
I'm looking for an API to inform us about agent state changes for all agents in the system. I know about "v2.users.{id}.activity topic". However, this topic requires us to provide an ID of each user in the system. Is there a way to subscribe to this or a similar event topic without prior knowledge of all agent IDs?
jacobshaw | 2022-01-26 18:48:01 UTC | #2
HI borys.spiridonov,
You can find a list of all available notification topics on API Explorer using this endpoint: GET /api/v2/notifications/availabletopics
All of the user topics take an id as a parameter, so it requires getting the userId for the agent first. You could get those by searching with user email address, for example, with the POST /api/v2/users/search endpoint with a post body such as:
{
pageSize: 25,
pageNumber: 1,
query: [{
type: "TERM",
fields: ["email", "name"],
value: email
}]
};
system | 2022-02-25 18:44:00 UTC | #3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 13328