Query Agent Queue Statuses

Queries the statuses of the current agent in queues. The statuses are returned based on the agent user of the access token, which must be obtained using a user token rather than a platform token.

Request URL

GET {base_url}/uc-cconfig/api/v1/queues/agents/status

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code Yes String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Query parameters
Parameter Required Type Description
queueExtensions No Array<String> The extension numbers of the specified queues.
withReasons No Boolean Whether to return the list of tenant pause reasons in the response.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Agent_Queue_Status_Result> The statuses of the agent in queues.
Agent_Queue_Status_Result
Parameter Type Description
queues Array<Agent_Queue_Status_Item> The list of queue status items.
availableActions Array<String>

The actions available for the agent at the global level:

  • ACTION_LOGIN
  • ACTION_LOGOUT
  • ACTION_PAUSE
  • ACTION_UNPAUSE
  • ACTION_LOGIN_TO_LAST_QUEUES
pauseReasons Array<Pause_Reason_Data> The list of tenant pause reasons. This field is returned only when withReasons is set to true.
Agent_Queue_Status_Item
Parameter Type Description
queueId String The ID of the queue.
queueExtension String The extension number of the queue.
queueName String The name of the queue.
agentType String

The type of the agent in the queue:

  • static: Static agent.
  • dynamic: Dynamic agent.
status String The status of the agent in the queue.
pauseReason String The reason for pausing the agent.
availableActions Array<String>

The actions available for the agent at the queue level:

  • ACTION_LOGIN
  • ACTION_LOGOUT
  • ACTION_PAUSE
  • ACTION_UNPAUSE
  • ACTION_LOGIN_TO_LAST_QUEUES
pausedAt String The timestamp when the agent was paused, in milliseconds. This field is returned only when the agent status is paused.
Pause_Reason_Data
Parameter Type Description
id String The ID of the pause reason.
featureCode String The feature code of the pause reason.
reason String The description of the pause reason.

Example

Request example

GET /uc-cconfig/api/v1/queues/agents/status?withReasons=true HTTP/1.1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t5Xku-9jZSU7MJl_oxuohSn6gEWDKIEZzlKQBTN7tvV_url1jSiEcKbkqqZcp0LtEolCkEbt01nIvaTqATEzeFb0PGog5MqnGD-rTWFvCXoCRBM4OCpmxvZTP5vva2Vf1MIYhUHwFqq9RipBxBkdagJuwp6Bw
x-tenant-code: jint

Response example

HTTP/1.1 200 OK
{
  "requestId": "ec42471ab24f24118181ed54b466d0c6",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "queues": [
      {
        "queueId": "338525903356534784",
        "queueExtension": "6401",
        "queueName": "6401",
        "agentType": "static",
        "status": "Available",
        "pauseReason": "",
        "availableActions": [
          "ACTION_PAUSE"
        ],
        "pausedAt": "0"
      },
      {
        "queueId": "368364155591933952",
        "queueExtension": "9901",
        "queueName": "test-queue-utoken",
        "agentType": "static",
        "status": "Available",
        "pauseReason": "",
        "availableActions": [
          "ACTION_PAUSE"
        ],
        "pausedAt": "0"
      }
    ],
    "availableActions": [
      "ACTION_PAUSE"
    ],
    "pauseReasons": [
      {
        "id": "341037055301083136",
        "featureCode": "*01",
        "reason": "Lunch"
      },
      {
        "id": "341041142516113408",
        "featureCode": "*02",
        "reason": "Break"
      }
    ]
  }
}