Page tree
Skip to end of metadata
Go to start of metadata
This method allows listing all the agents that are registered to a queue in particular contexts such as User, Organization or global.

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:

Model
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>
Example
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:

NameTypeRequiredDescription

userId

User-Id

Yes

Id of the User which owns the queue.
It can take one of the following values:
@me - refers to the authenticated User .
@viewer - also refers to the authenticated User .
@owner - refers to the User that owns the Extension used to make the phone call.
User-Id - refers to the unique identifier of the User.
Default: @me

extension UAPI-Extension-Number YesNumber of the Queue Extension.
Cannot be set to @self.
agent

UAPI-Agent-ID

NoIdentifier 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:

NameTypeDescription
countNumber

The page size of a collection.
Maximum possible value is 5000.
Default: 20 entries

filterBy

String

Records can be filtered by all fields of the Queue Agent.

filterValueStringThe value to filter by.
startIndexNumberThe start index of the paged collection.
Maximum possible value is 5000.
Default: 0
Custom Request Parameters

It also supports the custom parameter:

NameTypeDescription

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 CodeDescription
200The list of QueueAgent resources is returned.
204There are no QueueAgent resources to be returned.

Failure

When it fails, the request returns the following error codes:

HTTP CodeCodeDescription
400fields_invalidValue 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).
400count_invalidValue supplied in count parameter is missing or invalid. The parameter must be set to a numeric value lower than 5000.
400filterby_invalidValue supplied in filterBy parameter is missing or invalid. The parameter must be set to the name of a Agent field.
400filterop_invalidValue supplied in filterOp parameter is missing or invalid. The parameter must be set to one of the values: contains, equals, starts with or present.
400filtervalue_invalidValue supplied in filterValue parameter is missing or invalid. The parameter must be set to a string value.
400sortorder_invalidValue supplied in sortOrder parameter is missing or invalid. The parameter must be set to one of the values: ascending or descending.
400startindex_invalidValue 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.

HTTP Request
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 Response
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"}  
 }
]

}
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.