Updated on 2023-12-19 GMT+08:00

Querying Agent Information by Agent Status in Pagination Mode

Scenario

This interface is invoked to query agent information in pagination mode by agent status.

Interface Method

This interface supports only the POST method.

Internal Encapsulation Interfaces

BMS interface: /ccbms/ws/monitor/siteagentinfobyagentids

URI

https://ip:port/rest/cmsapp/v1/openapi/vdn/queryAgentByStatus

In a public cloud environment, ip indicates the IP address of the CC-CMS server, and port indicates the HTTPS port number of the CC-CMS server. Contact the administrator to obtain the values.

In a non–public cloud environment where the NSLB service is configured, ip indicates the IP address of the NSLB server, and port indicates the HTTPS port number of the CC-CMS service mapped on the NSLB server.

Request Description

Table 1 Parameters in the request header

Parameter

Mandatory

Type

Default Value

Description

Content-Type

Yes

String

None

The value is fixed at application/json; charset=UTF-8.

Authorization

Yes

String

None

For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

Table 2 Parameters in the request body

Parameter

Mandatory

Type

Default Value

Description

ccId

Yes

String (1–25)

None

Call center ID.

The value ranges from 1 to 65535.

vdn

Yes

String

None

ID of a virtual call center.

The value ranges from 1 to 5000.

status

Optional

String

None

Agent status.

For details about the value, see CTI Platform Agent Status Code Reference.

offset

Yes

Number

None

offset is used to determine the start page of the query.

The value range of offset is as follows: The value of offset is equal to limit x (page – 1). The value is greater than or equal to 0.

page indicates the start page to be queried.

limit

Yes

Number

None

Number of records on each page. The maximum value is 1000.

Response Description

Table 3 Parameters in the response message

Parameter

Type

Description

returnCode

String

Result code returned.

0: success

Other values: failure

description

String

Request result description.

data

Array

Response data.

Table 4 Parameters in the response message body

Parameter

Type

Description

agentId

Number

Agent ID.

locationId

Number

Home distributed access node.

This parameter is a CTI reserved field and has no actual meaning.

currentState

Number

Agent status.

CTI Platform Agent Status Code Reference describes the parameters.

currentStateTime

Number

Duration of the current state, in seconds.

Error Codes

None

Message Example

  • Request header
    Content-Type: application/json;charset=UTF-8
    Authorization: ******************
  • Request parameters
    {
      "ccId": "1","vdn": "3","status": "0","limit": 10,"offset": 0
    }
  • Response parameters
    {
      "returnCode": "0",
      "data": [
        {
          "agentId": 108,
          "locationId": 65535,
          "currentStateTime": 426849,
          "currentState": 0
        },
        {
          "agentId": 109,
          "locationId": 65535,
          "currentStateTime": 426849,
          "currentState": 0
        }
      ],
      "description": "success"
    }