Request/Response model
Overview
Use this request to list all the agents that are registered to a queue.
If successful, the Service returns a collection of QueueAgent resources.
The request is made by an App that is registered to a User account.
To list the agents reqistered to a queue in a desired context, issue a HTTP GET request:
HTTP-Method = "GET" URI-Fragment = "/uapi/extensions/" User-Id "/" Extension-Number "/queue/agents" ["/" UAPI-Agent-ID ] Query-Parameters = Get-QueueAgents-Request-Parameters Request-Payload = null Return-Object = Collection<QueueAgent>
GET /uapi/extensions/@me/0003*212/queue/agents/0003*210 HTTP/1.1
HOST uapi.voipnow.com
Content Type: application/json
Authorization: Bearer token
Request
This section describes how to format the request to the service.
URI fragment
The following parameters must be sent in the URI fragment:
Name | Type | Required | Description |
userId | Yes | Id of the User which owns the queue. | |
extension | UAPI-Extension-Number | Yes | Number of the Queue Extension. Cannot be set to @self. |
agent | No | Identifier of the queue agent. This can be set to an extension number if the agent is local or an Id for remote agents. |
Get QueueAgents request parameters
Restriction to Standard Request Parameters
All requests to list PhoneCallEvents support the Standard-Request-Parameters with the following restrictions:
Name | Type | Description |
count | Number | The page size of a collection. |
filterBy | String | Records can be filtered by all fields of the Queue Agent. |
filterValue | String | The value to filter by. |
startIndex | Number | The start index of the paged collection. Maximum possible value is 5000. Default: 0 |
Custom Request Parameters
It also supports the custom parameter:
Name | Type | Description |
fields | Array<String> | An array of Phone Call Event field names. For standard values, please see the Agent resource. |
Response
Success
If successful, the request returns a collection of QueueAgent resources and the following HTTP statuses:
HTTP Code | Description |
200 | The list of QueueAgent resources is returned. |
204 | There are no QueueAgent resources to be returned. |
Failure
When it fails, the request returns the following error codes:
HTTP Code | Code | Description |
400 | fields_invalid | Value supplied in fields parameter is missing or invalid. The parameter must be set to a value of consisting of the name of the possible Agent fields separated by a comma (e.g. extension, id, answered). |
400 | count_invalid | Value supplied in count parameter is missing or invalid. The parameter must be set to a numeric value lower than 5000. |
400 | filterby_invalid | Value supplied in filterBy parameter is missing or invalid. The parameter must be set to the name of a Agent field. |
400 | filterop_invalid | Value supplied in filterOp parameter is missing or invalid. The parameter must be set to one of the values: contains, equals, starts with or present. |
400 | filtervalue_invalid | Value supplied in filterValue parameter is missing or invalid. The parameter must be set to a string value. |
400 | sortorder_invalid | Value supplied in sortOrder parameter is missing or invalid. The parameter must be set to one of the values: ascending or descending. |
400 | startindex_invalid | Value supplied in startIndex parameter is missing or invalid. The parameter must be set to a numeric value, higher or equal with 0 and lower than 5000. |
Example
Below you can find an example that will help you understand the request and the response.
This example lists all the agents that are registered to the queue 0003*212. The request is made by an App on behalf of a User.
GET /uapi/extensions/@me/0003*212/queue/agents/0003*210 HTTP/1.1 HOST uapi.voipnow.com Content Type: application/json Authorization: Bearer token
Assuming that the request has been successful, the Service sends the following answer:
HTTP/1.1 200 OK ... { ... "entry": [ { "agentNumber": "0003*210", "status": "0", "queue": "0003*212", "links": {"self":"https://x.x.x.x/uapi/extensions/@me/0003*210/queue/agents/0003*210"} } ] }
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.