Get agents and queues

post

/engagement/api/agent/{fqSiteName}/v1/retrieveAgentsAndQueues

This operation is used by the agent to retrieve agent and queue information.
The following is the list of exception codes that can be returned from this operation:
  • ACCESS_DENIED - Authentication failed.
  • UNKNOWN_EXCEPTION - An unknown error has occurred.
  • BAD_REQUEST - A field in the request is invalid.
  • INTERNAL_SERVER_ERROR - An error occurred within the core server.
  • INVALID_FIELD - An invalid agent information type was sent on the request.

Request

Path Parameters
Header Parameters
  • A header element containing the agent account identifier.
  • A header element containing the unique session identifier returned in the create automated agent session call.
Body ()
The object containing the request information.
Root Schema : com.rightnow.chat.rest.agent_api.model.requests.v1.RetrieveAgentsAndQueuesRequest
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

The request completed successfully.
Body ()
Root Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.RetrieveAgentsAndQueuesResponse
Type: object
Show Source
Nested Schema : agents
Type: array
The list of agent information objects.
Show Source
Nested Schema : queues
Type: array
The map of queue information objects keyed by the String representation of the queue identifier.
Show Source
Nested Schema : com.rightnow.chat.rest.agent_api.model.types.v1.AgentInformation
Type: object
Show Source
Nested Schema : mediaList
Type: array
The media list.
Show Source
Nested Schema : com.rightnow.chat.rest.common.model.types.v1.MediaInfo
Type: object
Show Source
Nested Schema : environmentErrorList
Type: array
The media environment error list.
Show Source
Nested Schema : com.rightnow.chat.rest.agent_api.model.types.v1.QueueInformation
Type: object
Show Source
Nested Schema : profileIdsList
Type: array
The list of profile Ids associated with the queue.
Show Source
Nested Schema : profileIdsStringList
Type: array
The list of profile Ids as a String associated with the queue.
Show Source

400 Response

The validation of the request object failed.
Body ()
Root Schema : schema
Type: object

403 Response

The agent session identifier is unknown.
Body ()
Root Schema : schema
Type: object

404 Response

The resource was not found.
Body ()
Root Schema : schema
Type: object

500 Response

An error occurred in the chat server while processing the request.
Body ()
Root Schema : schema
Type: object
Back to Top

Examples

The following example shows how to have an agent retrieve agent and queue information.

cURL Command Example

curl -X POST https://chat_rest_server_domain.com/engagement/api/agent/day001_221100_sql_001h/v1/retrieveAgentsAndQueues?pool=297:1 -H 'Content-Type: application/json; charset=UTF-8' -H 'X-JSESSIONID: node01h8m13tljpm7ns8nayp0pid91' -d ' -H 'X-AID: 12' {"timeCreated" :160444022000, "sequenceNumber" : 10,  "includeAgentInformation": true,  "id": 14, "type": "GROUP", "includeQueueInformation": true, "includeQueueStatistics": true}'

Request Body Example

The following shows an example of the request body in JSON format.

{
  "includeAgentInformation": true,	
  "id": 14,
  "type": "GROUP",
  "includeQueueInformation": true,
  "includeQueueStatistics": true	
}

Response Header Example

The following shows an example of the response header.

Status: 200 OK
Content-Type: application/json;charset=utf-8

Response Body Example

The following shows an example of the response body in JSON format.

{
  "agents": [],
  "clientSendTime": 160444022000,
  "serviceStartTime": 1604440224927,
  "serviceFinishTime": 1604440224932,
  "sessionId": "node0f0ctgqi8tbj59nnw9r9wx0ee0",
  "clientId": 47,
  "clientIdString": "47",
  "sequenceNumber": 0,
  "sequenceNumberString": "0",
  "queues": [
    {
    "queueId": 1,
    "queueIdString": "1",
    "availableAgentSessions": 0,
    "availableAgentSessionsString": "0",
    "totalAvailableAgents": 0,
    "totalUnavailableAgents": 1,
    "totalAgentsRequestingNewEngagement": 0,
    "expectedWaitSeconds": 0,
    "expectedWaitSecondsString": "0",
    "engagementsInQueue": 0,
    "profileIdsList": [
      14
    ],
    "profileIdsStringList": [
      "14"
    ]
    }
  ]
}
Back to Top