List and search users
Request to list users:
GET /api/v2/users.json
Example of response:
{
"users": [{
"user_id": "61e6e6b0-f147-11e5-b8b3-e03f497dbdff",
"name": "John Smith",
"groups": ["47f53fcc-9201-11e5-b4ef-e03f497dbdff"],
...
},{
"user_id": "e011c408-f288-11e4-9b73-e03f497dbdff",
"name": "Mary Jones",
"groups": ["47f53fcc-9201-11e5-b4ef-e03f497dbdff"],
...
}],
"total": null,
"next_url": "/api/v2/users.json?limit=20&start=20"
}
Each item is a complete user object. See Collections for paging.
Search users
Several parameters may be combined.
| Parameter | Description |
|---|---|
search_term |
Search a text in the user name, login, extension, group name, role name, and tenant name. Partial match, case insensitive. |
| name | Search by user name. Partial match, case insensitive. |
| login | Search by login. Exact match. |
| extension | Search by extension. Exact match. |
group_id |
Filter by group ID. |
tenant_id |
Filter by tenant ID. |
Example with several parameters:
GET /api/v2/users.json?tenant_id=2bfcefd4-f41d-11e4-983d-e03f497dbdff&search_term=supervisors
Response contains HTTP status code as shown in the following table.
| Response | Description |
|---|---|
| 200 OK | The list of users is returned in the response body |
| 403 Forbidden | The request cannot be completed because API user has no permission to view users |
| 404 Not Found | The group_id or tenant_id parameter is not a valid UUID |