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

Request/Response Model

Overview

Use this request to log in, log out or pause a queue agent.

If successful, the Service returns the agent number and the status as a QueueAgent resource.

The request is made by an App that is registered to a User account.

To update the statuses of agents registered to a particular queue in a desired context, issue a HTTP PUT request:

Model
HTTP-Method       = "PUT"
URI-Fragment      = "/uapi/extensions/" User-Id "/" Extension-Number "/queue/agents/" UAPI-Agent-ID
Query-Parameters  = null 
Request-Payload   = QueueAgent

Return-Object     = Array<QueueAgent>
Example
PUT /uapi/extensions/@me/0003*212/queue/agents/0003*210 HTTP/1.1
HOST uapi.voipnow.com
Content Type: application/json
Authorization: Bearer token

{
    "status": "1"
}


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
agentYesIdentifier of the queue agent.
Can be set to an extension number if the agent is local or to an Id for remote agents.

Response

Success

If successful, the request returns the agent number and the status as a QueueAgent resource, as well as the following HTTP statuses:

HTTP CodeDescription
200The QueueAgent resource is returned.
204There are no QueueAgent resources to be returned.

Failure

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

HTTP CodeCodeDescription
400status_invalidValue supplied in type parameter is missing or invalid. The parameter must be set to one of the following value: 0 for DialIn, 1 for DialOut and 2 for Hangup.
400extension_invalidValue supplied in the URI-Fragment as extension is invalid. The parameter must reference the number of an existing Queue extension and cannot be set to @self.
400qag_agent_invalidValue supplied in status parameter is missing or invalid. The parameter can take the values: 0 for Logged Out, 1 for Online, 2 for Paused.

Example

Below you can find an example that will help you understand the request and the response.

This example updates the agent 0003*210 which is registered to the queue 0003*212. The request is made by an App on behalf of a User.

HTTP Request
PUT /uapi/extensions/@me/0003*212/queue/agents/0003*210 HTTP/1.1
HOST uapi.voipnow.com
Content Type: application/json
Authorization: Bearer token

{
   "status": "1"
}

Assuming that the request has been successful, the Service sends the following answer:

HTTP Response
HTTP/1.1 200 OK
...
[
 {
  "agentNumber": "0003*210",
  "status": "1",
  "queue": "0003*212",
  "links": {"self":"https://x.x.x.x/uapi/extensions/@me/0003*212/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.