Query Agent Status of a Queue

Query agent status of a specific queue.

Request URL

GET {base_url}/{api_path}/queue/agent_status?access_token={access_token}

Request parameters

Parameter Required Type Description
id Yes Integer The unique ID of the queue.
Note: You can query queue's ID using Search Specific Queues.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
total_number Integer The total number of agents in the queue.
data Array<Agent_List> Information of each agent.
Agent_List
Parameter Type Description
name String Agent name.
number String Agent's extension number.
is_login Integer Whether the agent is logged in to the queue.
  • 0: Logged out.
  • 1: Logged in.
is_pause Integer Whether the agent has paused receiving queue calls.
  • 0: Unpaused.
  • 1: Paused.
call_status Integer Agent's call status.
  • 0: Unknown.
  • 1: Idle.
  • 2: In a call.
  • 3: Ringing.
  • 4: Receiving a new call during a call.
  • 5: On hold.
    Note: If the caller puts the call on hold, the agent's call status returns 5 (On hold). If the agent puts the call on hold, the agent's call status returns 2 (In a call).
pause_reason String Agent's pause reason.
agent_type String The type of the agent.
  • dynamic
  • static

Examples

Request example

Query the status of agent members in a queue (ID: 3).

GET /openapi/v1.0/queue/agent_status?access_token=9G4E5fCWO5lgx14m0NNwS91VvACHUNmU&id=3 HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 5,
    "data": [
        {
            "name": "Leo Ball",
            "number": "1000",
            "is_login": 1,
            "is_pause": 0,
            "call_status": 1,
            "pause_reason": "",
            "agent_type": "dynamic"
        },
        {
            "name": "Phillip Huff",
            "number": "1001",
            "is_login": 1,
            "is_pause": 1,
            "call_status": 1,
            "pause_reason": "Break",
            "agent_type": "dynamic"
        },
        {
            "name": "Madison Cooper",
            "number": "1004",
            "is_login": 1,
            "is_pause": 0,
            "call_status": 2,
            "pause_reason": "",
            "agent_type": "static"
        },
        {
            "name": "Kevin Connor",
            "number": "1005",
            "is_login": 1,
            "is_pause": 0,
            "call_status": 1,
            "pause_reason": "",
            "agent_type": "static"
        },
        {
            "name": "Kristin Hale",
            "number": "1006",
            "is_login": 1,
            "is_pause": 0,
            "call_status": 2,
            "pause_reason": "",
            "agent_type": "static"
        }
    ]
}