QueueAgents Service
The QueueAgents Service is used to log in, log out or pause an agent. You can find more details about the queues and how the system manages them in the Queue Extension section of the VoipNow manual.
This service is available to Apps registered to the following account types:
Administrator
Organization
User
Base URL
https://{domain}/uapiEndpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /extensions/{userId}/{extension}/queue/agents/{identifier} | List QueueAgents |
| PUT | /extensions/{userId}/{extension}/queue/agents/{identifier} | Update QueueAgents |
List QueueAgents
Use this request to list all the agents that are registered to a queue.
/extensions/{userId}/{extension}/queue/agents/{identifier}Request
Path Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
userId | string | Yes | Id of the User which owns the queue. It can take one of the following values:
| - |
extension | string | Yes | Number of the Queue Extension. | - |
identifier | string | Yes | Identifier of the queue agent. | - |
Query Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
count | count | No | - | |
filterBy | string | No | Records can be filtered only by the following properties:
| - |
filterOp | string | No | The parameter must be set to one of the values: | equals |
filterValue | filterValue | No | - | |
startIndex | startIndex | No | - | |
fields | array | No | An array of Agent resource field names. The following values are allowed:
| - |
sortOrder | sortOrder | No | The parameter can be set to one of the values: asc or desc (E.g. sortOrder=desc). Records will be ordered by status. You are not allowed to set the field to sort by. | - |
Authentication
This endpoint requires authentication via cookie or header token.
Responses
200 OK
If successful, the request returns a collection of QueueAgent resources and the following HTTP statuses:
Example Response
[
{
"entry": [
{
"agentNumber": "0003*210",
"status": 1,
"queue": "0003*212",
"type": "local",
"identifier": "bG9jYWw6MTIz",
"links": {
"self": "https://x.x.x.x/uapi/extensions/@me/0003*212/queue/agents/bG9jYWw6MTIz"
}
}
]
}
]400 Bad Request
Error codes:
Code Examples
cURL
curl 'https://api.hubgets.com/uapi/extensions/@me/0003*210/queue/agents/' \
-H 'x-xsrf-token: 44HzZ6YIHDN6mbRY' \
-H 'content-type: application/json' \
-H 'cookie: dev=ffffffffffffffff2kjZMApYaH; xsrf-token=44HzZ6YIHDN6mbRY; vn=XI%2Cm-tpsEWgqBMBCNVpeAnUEaeqCpG7fUpdate QueueAgents
Use this request to log in, log out or pause a queue agent.
/extensions/{userId}/{extension}/queue/agents/{identifier}Request
Path Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
userId | string | Yes | Id of the User which owns the queue. It can take one of the following values:
| - |
extension | string | Yes | Number of the Queue Extension. | - |
identifier | string | Yes | Identifier of the queue agent. | - |
Authentication
This endpoint requires authentication via cookie or header token.
Payload
Request Payload
| Property | Type | Required | Description |
|---|---|---|---|
agentNumber | string | No | |
status | string | No |
Responses
200 OK
If successful, this method returns a 200 OK HTTP status code and the updated QueueAgent resource.
Type: Array of object
Example Response
[
{
"agentNumber": "0003*210",
"status": 1,
"queue": "0003*212",
"type": "local",
"identifier": "bG9jYWw6MTIz",
"links": {
"self": "https://x.x.x.x/extensions/@me/0003*212/queue/agents/bG9jYWw6MTIz"
}
}
]400 Bad Request
If an error occurred, this API can return the standard Errors Codes or one the following:
Error codes:
QueueAgentsErrors
Code Examples
cURL
curl 'https://api.hubgets.com/uapi/extensions/@me/0003*212/queue/agents/bG9jYWw6MTIz' \
-X 'PUT' \
-H 'x-xsrf-token: 44HzZ6YIHDN6mbRY' \
-H 'content-type: application/json' \
-H 'cookie: dev=ffffffffffffffff2kjZMApYaH; xsrf-token=44HzZ6YIHDN6mbRY; vn=XI%2Cm-tpsEWgqBMBCNVpeAnUEaeqCpG7f' \
--data-binary '{"status":"1"}'