Querying Agent Rest Information in a Specified VDN
Scenario
This interface is invoked to query all agent rest information in a specified VDN.
Interface Method
The request method must be set to POST. This interface supports only the POST method.
Internal Encapsulation Interface
BMS interfaces:
- /ccbms/ws/monitor/teamrestinfo
- /ccbms/ws/monitor/teamrestagentinfo
- /ccbms/ws/monitor/agentstatusinfobyagentids
Request URL
https://ip:port/rest/cmsapp/v1/openapi/vdn/queryagentreststate
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
No. |
Parameter |
Value Type |
Mandatory |
Description |
---|---|---|---|---|
1 |
Content-Type |
String |
Yes |
The value is fixed at 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. |
No. |
Parameter |
Value Type |
Mandatory |
Description |
---|---|---|---|---|
1 |
ccId |
Integer |
Yes |
ID of a call center. The value ranges from 1 to 65535. |
2 |
vdn |
Integer |
Yes |
ID of a VDN. The value ranges from 1 to 5000. |
3 |
limit |
Integer |
Yes |
Number of query records on each page. The value ranges from 1 to 1000. |
4 |
offset |
Integer |
Yes |
Parameter for determining the start page of the query. Value of offset = Value of limit x (Value of page – 1). The value of offset is greater than or equal to 0. page indicates the start page of the query. |
Response Description
No. |
Parameter |
Value Type |
Description |
---|---|---|---|
1 |
result |
String |
Query result. The options are as follows:
For details about the failure causes, see Error Code Reference.
NOTE:
This field is reserved for compatibility with interface response parameters in 8.13 and earlier versions. |
2 |
resultCode |
String |
Query result. The options are as follows:
|
3 |
resultDatas |
Object |
Object in the returned result after a successful query. For details about the parameters of this object, see Table 4.
NOTE:
This field is reserved for compatibility with interface response parameters in 8.13 and earlier versions. |
4 |
resultDesc |
Object |
Object in the returned result after a successful query. For details about the parameters of this object, see Table 4. |
5 |
count |
Integer |
Total number of agents in the VDN. |
No. |
Parameter |
Value Type |
Description |
---|---|---|---|
2.1 |
onRestAgentNum |
Integer |
Number of resting agents. |
2.2 |
allowRestAgentNum |
Integer |
Number of agents who are allowed to have a rest but still at work. |
2.3 |
waitRestAgentNum |
Integer |
Number of agents who apply for a rest. |
2.4 |
details |
Array |
Agent rest details. For details about the parameters of the object in this array, see Table 5. |
NOTE:
The response result is the agent rest data obtained based on the pagination parameters limit and offset in the request. For example, if both limit and offset are set to 10, the 10 agents on the second page (10 agents per page) are obtained, and then rest statistics on the 10 agents are collected. |
No. |
Parameter |
Value Type |
Description |
---|---|---|---|
2.4.1 |
agentId |
Integer |
Agent ID. |
2.4.2 |
cantRestCause |
Integer |
Reason why agents are not allowed to have a rest. This parameter is valid only for the agents who wait for a rest. For details about the parameters of this object, see Table 6. |
2.4.3 |
vdnId |
Integer |
ID of a VDN. |
2.4.4 |
ccId |
Integer |
ID of a call center. |
2.4.5 |
beginTime |
Long |
Start time. This parameter indicates the rest start time for resting agents, and the start time of applying for or approving a rest for agents not resting. The time format is timestamp. |
2.4.6 |
applyRestLength |
Integer |
Requested rest duration, in seconds. |
2.4.7 |
name |
String |
Agent name. |
2.4.8 |
reqRestDura |
Long |
Rest duration, that is, the rest duration of an agent who is taking a rest, in seconds. |
2.4.9 |
skillIds |
String |
Skill queue to which an agent waiting for a rest signs in. The value is returned only when the value of cantRestCause is 4. |
Value of the Reason for Not Allowing Rest |
Description |
---|---|
0 |
The agent is waiting for approval. |
1 |
The agent is in busy state. |
2 |
The number of agents who can take a rest in the VDN reaches the maximum. |
3 |
The agent does not answer any inbound calls, because the agent does not sign in to any skill queues. |
4 |
The number of resting agents in a skill queue the agent signs in reaches the maximum. |
Message Example
- Request header
Content-Type: application/json;charset=UTF-8 Authorization: ******************
- Request parameters
{ "ccId":1, "vdn":170, "offset":0, "limit":3 }
- Response parameters
{ "result": "0", "resultCode": "0100000", "resultDatas": { "onRestAgentNum": 2, "allowRestAgentNum": 0, "details": [ { "agentId": 1034, "cantRestCause": 2, "vdnId": 170, "ccId": 1, "beginTime": 1602830642000, "applyRestLength": 600, "name": "zhang1130user" }, { "agentId": 1039, "cantRestCause": 0, "vdnId": 170, "ccId": 1, "beginTime": 1602830613000, "applyRestLength": 600, "name": "HW285601039", "reqRestDura": 238 }, { "agentId": 1099, "cantRestCause": 0, "vdnId": 170, "ccId": 1, "beginTime": 1602830638000, "applyRestLength": 600, "name": "HW285601099", "reqRestDura": 213 } ], "waitRestAgentNum": 1 }, "resultDesc": { "onRestAgentNum": 2, "allowRestAgentNum": 0, "details": [ { "agentId": 1034, "cantRestCause": 2, "vdnId": 170, "ccId": 1, "beginTime": 1602830642000, "applyRestLength": 600, "name": "zhang1130user" }, { "agentId": 1039, "cantRestCause": 0, "vdnId": 170, "ccId": 1, "beginTime": 1602830613000, "applyRestLength": 600, "name": "HW285601039", "reqRestDura": 238 }, { "agentId": 1099, "cantRestCause": 0, "vdnId": 170, "ccId": 1, "beginTime": 1602830638000, "applyRestLength": 600, "name": "HW285601099", "reqRestDura": 213 } ], "waitRestAgentNum": 1 }, "count": 30 }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot