Get All Users
Description
The interface GET_ALL_USERS is a REST API for retrieving all Genesys Cloud Users (Agents). This API can be used to filter out any needed aggregates.
Business Application
This data is foundational for all agent-centric reporting. It validates Agent Rostering and allows other reports (like AHT or Evaluations) to segment data by Department, Division, or Manager.
[!TIP] Implementation Note: Caching User attributes (Name, Department, Division) change infrequently. To optimize performance, cache this data via a daily job (e.g., CRON) rather than querying it in real-time or by interval.
Endpoint
POST https://api.mypurecloud.de/api/v2/users/search
Request
Headers
- Authorization: Bearer Token (generated using Genesys token API)
- Content-Type:
application/json
Body Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
pageSize |
Integer | Yes | Requested page size |
pageNumber |
Integer | Yes | Requested page number |
Sample Request
{
"pageSize": 100,
"pageNumber": 1
}
CURL Example
curl -X POST 'https://api.mypurecloud.de/api/v2/users/search' \
-H 'Authorization: Bearer *******************' \
-H 'Content-Type: application/json' \
--data-raw $'{"pageSize":100,"pageNumber":1}'
Response
Status Codes
- 200: Successful
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 503: Service Unavailable
Body Parameters
| Name | Type | Description |
|---|---|---|
total |
Integer | Total number of agents |
pageCount |
Integer | Number of pages found |
pageSize |
Integer | Requested page size |
results |
Array | List of user objects containing ID, name, and email |
Sample Response
{
"total": 1,
"pageCount": 1,
"pageSize": 100,
"pageNumber": 1,
"results": [
{
"id": "<USER_ID>",
"name": "Jane Doe",
"division": {
"id": "<DIVISION_ID>",
"name": "Home",
"selfUri": "/api/v2/authorization/divisions/<DIVISION_ID>"
},
"chat": {
"jabberId": "<JABBER_ID>"
},
"department": "Support",
"email": "jane.doe@example.com",
"primaryContactInfo": [
{
"address": "jane.doe@example.com",
"mediaType": "EMAIL",
"type": "PRIMARY"
}
],
"addresses": [],
"state": "active",
"username": "jane.doe@example.com",
"manager": {
"id": "<MANAGER_ID>",
"selfUri": "/api/v2/users/<MANAGER_ID>"
},
"images": [
{
"resolution": "x96",
"imageUri": "https://api-downloads.mypurecloud.de/directory-profile/<IMAGE_ID>.jpg"
}
],
"version": 10,
"preferredName": "Jane",
"acdAutoAnswer": false,
"selfUri": "/api/v2/users/<USER_ID>"
}
]
}