Updated on 2023-09-27 GMT+08:00

Querying Details of a Specified Agent

Description

This interface is invoked to query details of a specified agent.

Request Method

The request method must be set to POST. This interface supports only the POST method.

Internal Encapsulation Interfaces

BMS interface: /ccbms/ws/monitor/siteagentinfobyagentids

Request URL

https://ip:port/rest/cmsapp/v1/openapi/agentgroup/agentbyworkno

In the URL, 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

No.

Parameter

Type

Mandatory

Description

1

Content-Type

String

Yes

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

2

Authorization

String

Yes

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

  • Message header

    Content-Type:application/json; charset=UTF-8

  • Message body

    The following provides an example of the request message body of this interface:

    {
        "queryParam":
        {
            "ccId":1, 
            "vdn":1,
            "agentId":101
        }
    }

Table 2 describes the parameters in the request message body of this interface.

Table 2 Parameters in the message body

Parameter

Type

Mandatory

Description

ccId

Integer

Yes

ID of a call center.

The value ranges from 1 to 65535.

vdn

Integer

Yes

ID of a VDN.

The value ranges from 1 to 5000.

agentId

Integer

Yes

Agent ID.

The value ranges from 101 to 59999.

Response Message

The following provides an example of the response message body of this interface:

{
  "result": "0",
  "resultDatas": {
    "workno": 101,
    "vdnid": 1,
    "citStatus": 0,
    "name": "HW35154101",
    "phonenumber": null,
    "logindate": 4294967295000,
    "currentstatetime": 436879,
    "mediatype": 0,
    "status": 2
  }
}

Table 3 describes the parameters in the response message body of this interface.

Table 3 Parameters in the message body

Parameter

Type

Description

result

String

Query result. The options are as follows:

  • 0: success
  • Other values: failure

For details about the failure causes, see Error Code Reference.

resultDatas

Object

Object in the returned result after a successful query.

For details about the parameters of this object, see Table 4.

Table 4 Parameters of resultDatas

Parameter

Type

Description

workno

Integer

Agent ID.

vdnid

Integer

ID of the VDN to which a call belongs.

citStatus

Integer

Platform status of an agent. For details, see CTI Platform Agent Status Code Reference.

name

String

Agent name.

phonenumber

String

Agent phone number.

logindate

Long

Sign-in time.

currentstatetime

Long

Duration in the current state.

mediatype

Integer

Agent media type. For details, see Table 1.

status

Integer

Agent status. The options are as follows:

0: Whether the SGSN and MME are integrated is unknown. The value corresponds to status 9 on the CTT platform.

2: sign-out The value corresponds to status 0 on the CTT platform.

3: busy The value corresponds to status 7 on the CTI platform.

4: idle The value corresponds to status 1 on the CTT platform.

5: wrap-up The value corresponds to status 6 on the CTT platform.

7: calling state. The value corresponds to states 2, 3, 4, and 5 on the CTT platform.

8: rest The value corresponds to status 8 on the CTT platform.