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:
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
-
fqSiteName(required): string
The fully qualified site name.
Header Parameters
-
X-AID(required): string
A header element containing the agent account identifier.
-
X-JSESSIONID(required): string
A header element containing the unique session identifier returned in the create automated agent session call.
The object containing the request information.
Root Schema : com.rightnow.chat.rest.agent_api.model.requests.v1.RetrieveAgentsAndQueuesRequest
Type:
Show Source
object-
id(required):
integer(int64)
The identifier associated with the specified type field value.
-
includeAgentInformation(required):
boolean
Indicates whether a list of agent information objects are required. If true, then it returns the list of agent information objects in the response. If true, then you must provide a value for 'id' and 'type' fields.
-
includeQueueInformation(required):
boolean
Indicates whether a list of queue information objects are required. If true, then it returns the list of queue information objects in the response.
-
includeQueueStatistics(required):
boolean
Indicates whether the queue statistics information is required. If true, then it returns the queue statistics information in the list of queue information objects in the response.
-
sequenceNumber:
integer(int64)
The client application defined transaction sequence number.
-
timeCreated:
integer(int64)
The time the request was created in milliseconds.
-
type(required):
string
Allowed Values:
[ "GROUP", "PROFILE", "ENGAGEMENT" ]The identifier type.
Response
Supported Media Types
- application/json; charset=utf-8
200 Response
The request completed successfully.
Root Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.RetrieveAgentsAndQueuesResponse
Type:
Show Source
object-
agents(required):
array agents
The list of agent information objects.
-
clientId:
integer(int64)
The unique identifier of the agent client, created to identify the agent during this agent session.
-
clientIdString:
string
The unique identifier of the agent client in string format, created to identify the agent during this agent session.
-
clientSendTime:
integer(int64)
The time when the client request was received in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
queues(required):
array queues
The map of queue information objects keyed by the String representation of the queue identifier.
-
sequenceNumber:
integer(int64)
The client application defined transaction sequence number.
-
sequenceNumberString:
string
The client application defined transaction sequence number as a string.
-
serviceFinishTime:
integer(int64)
The time when the chat server completed processing the client request in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
serviceStartTime:
integer(int64)
The time when the chat server began processing the client request in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
sessionId:
string
The unique identifier of the agent session.
Nested Schema : queues
Type:
arrayThe 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:
Show Source
object-
accountId:
integer(int64)
The account identifier.
-
accountIdString:
string
The account identifier as a string.
-
availableSessionCount:
integer(int32)
The available session count of the agent.
-
clientId:
integer(int64)
The client identifier.
-
clientIdString:
string
The client identifier as a string.
-
currentEngagementCount:
integer(int32)
The number of engagements the agent is currently engaged in.
-
groupId:
integer(int32)
The group identifier.
-
maximumSessionCount:
integer(int32)
The maximum session count for the agent.
-
mediaList:
array mediaList
The media list.
-
name(required):
string
The agent name.
-
numberOfEngagementsInWrapUp:
integer(int32)
The number of engagements the agent has in wrap up mode.
-
profileId:
integer(int64)
The profile identifier.
-
profileIdString:
string
The profile identifier as a string.
-
status(required):
string
Allowed Values:
[ "NONE", "AVAILABLE", "UNAVAILABLE" ]The agent status. -
subTypeId:
integer(int32)
The sub-type identifier.
Nested Schema : com.rightnow.chat.rest.common.model.types.v1.MediaInfo
Type:
Show Source
object-
autoInitiate:
boolean
The indicator that the media info should be auto initiated. Default value is FALSE.
-
environmentErrorList:
array environmentErrorList
The media environment error list.
-
type(required):
string
Allowed Values:
[ "NONE", "CHAT", "COBROWSE", "VIDEO" ]The media type.
Nested Schema : com.rightnow.chat.rest.agent_api.model.types.v1.QueueInformation
Type:
Show Source
object-
availableAgentSessions:
integer(int64)
The number of available agent sessions.
-
availableAgentSessionsString:
string
The number of available agent sessions as a string.
-
engagementsInQueue:
integer(int32)
The number of engagements currently in the queue.
-
expectedWaitSeconds:
integer(int64)
The expected wait time in the queue, in seconds. The value is zero or greater than zero. The value is -1 if there's inadequate information.
-
expectedWaitSecondsString:
string
The expected wait time in the queue as a string.
-
profileIdsList:
array profileIdsList
The list of profile Ids associated with the queue.
-
profileIdsStringList:
array profileIdsStringList
The list of profile Ids as a String associated with the queue.
-
queueId(required):
integer(int64)
The queue identifier.
-
queueIdString:
string
The queue identifier as a string.
-
totalAgentsRequestingNewEngagement:
integer(int32)
Total number of agents who are available and have capacity.
-
totalAvailableAgents:
integer(int32)
Total number of agents whose status is available.
- totalUnavailableAgents: integer(int32)
Nested Schema : profileIdsList
Type:
arrayThe list of profile Ids associated with the queue.
Show Source
Nested Schema : profileIdsStringList
Type:
arrayThe list of profile Ids as a String associated with the queue.
Show Source
400 Response
The validation of the request object failed.
Root Schema : schema
Type:
object403 Response
The agent session identifier is unknown.
Root Schema : schema
Type:
object404 Response
The resource was not found.
Root Schema : schema
Type:
object500 Response
An error occurred in the chat server while processing the request.
Root Schema : schema
Type:
objectExamples
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"
]
}
]
}