GetHotlineServiceStatistics
Obtain service statistics under hotline monitoring. Supports grouped queries by instance, time dimension, agent, department, and skill group.
Operation description
Before invoking this API, ensure that you have activated the service and created an instance.
If you need to provide agent, department, or skill group information, refer to the guidance in the Request Parameters section.
Queries per second (QPS) limits
Per-user invocation frequency: 100 times per second.
API-wide invocation frequency: 100 times per second.
Throttling is triggered if the total invocations from multiple users exceed the API-wide frequency limit.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
AICCS instance ID. |
ccc_xp_pre-cn-*** |
| StartDate |
integer |
No |
Start date UNIX timestamp. Unit: milliseconds. |
1615083365000 |
| EndDate |
integer |
No |
End Datetime Variable as a UNIX timestamp. Unit: milliseconds. |
1617761765000 |
| PageSize |
integer |
No |
Page size. The value must be greater than 0. Default value: 20. |
10 |
| CurrentPage |
integer |
No |
Current page. The value must be greater than 0. Default value: 1. |
1 |
| AgentIds |
array |
No |
List of agent IDs. |
|
|
integer |
No |
Agent ID. You can invoke the GetAgent API and check the AgentId field in the response to obtain the agent ID. |
111 |
|
| DepIds |
array |
No |
List of department IDs. |
|
|
integer |
No |
Department ID. You can invoke the GetAllDepartment API and check the DepartmentId field in the response to obtain the department ID. |
100 |
|
| GroupIds |
array |
No |
List of skill group IDs. |
|
|
integer |
No |
Skill group ID. You can invoke the QuerySkillGroups API and view the SkillGroupId in the response parameters to obtain the skill group ID. |
123 |
|
| TimeLatitudeType |
string |
No |
Time latitude type for grouped queries. Valid values:
|
minute |
| ExistAgentGrouping |
boolean |
No |
Specifies whether to query by agent group. Valid values:
|
true |
| ExistDepartmentGrouping |
boolean |
No |
Specifies whether to query by department group. Valid values:
|
true |
| ExistSkillGroupGrouping |
boolean |
No |
Indicates whether to query by skill group grouping. Valid values:
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Request ID. |
EE338D98-9BD3-4413-B165 |
| Message |
string |
Status description. |
message |
| Data |
object |
Data list. |
|
| TotalNum |
integer |
Total number of records. |
4 |
| PageNum |
integer |
Current page number. |
1 |
| PageSize |
integer |
Page size. |
2000 |
| Rows |
string |
A JSON string of type List |
{"tenant_id":"905","n_resttype_now":0,"tenant_name":"非单元测试化BU","n_resttype1_now":0,"group_name":"-1","department_id":"-1","department_name":"-1","n_resttype98_now":0,"n_online_now":0,"date_id":"20210401","n_resttype3_now":0,"n_resttype5_now":0,"n_busy_now":0,"n_resttype2_now":0,"group_id":"-1","n_idle_now":0,"n_resttype4_now":0,"n_ack_now":0,"n_resttype99_now":0} |
| Code |
string |
Status code. A return value of 200 indicates that the request succeeded. |
200 |
| Success |
string |
Indicates whether the API invocation succeeded. Valid values:
|
true |
Parameter Guide for the returned parameter Rows:
n_idle_now: Current number of idle agents
n_resttype_now: Current number of agents on break
n_resttype1_now: Current number of agents on regular break
n_resttype2_now: Current number of agents on meal break
n_resttype3_now: Current number of agents on meeting break
n_resttype4_now: Current number of agents on coaching break
n_resttype5_now: Current number of agents on training break
n_resttype98_now: Current number of agents on forced break
n_resttype99_now: Current number of agents signed in but on break
n_ack_now: Current number of agents in post-processing
n_online_now: Current number of online agents
n_busy_now: Current number of agents on calls
group_name: Skill group name
group_id: Skill group ID
department_id: Department ID
department_name: Department name
date_id: Date
tenant_id: Tenant ID
tenant_name: Tenant name
Examples
Success response
JSON format
{
"RequestId": "EE338D98-9BD3-4413-B165",
"Message": "message",
"Data": {
"TotalNum": 4,
"PageNum": 1,
"PageSize": 2000,
"Rows": "{\"tenant_id\":\"905\",\"n_resttype_now\":0,\"tenant_name\":\"非单元测试化BU\",\"n_resttype1_now\":0,\"group_name\":\"-1\",\"department_id\":\"-1\",\"department_name\":\"-1\",\"n_resttype98_now\":0,\"n_online_now\":0,\"date_id\":\"20210401\",\"n_resttype3_now\":0,\"n_resttype5_now\":0,\"n_busy_now\":0,\"n_resttype2_now\":0,\"group_id\":\"-1\",\"n_idle_now\":0,\"n_resttype4_now\":0,\"n_ack_now\":0,\"n_resttype99_now\":0}"
},
"Code": "200",
"Success": "true"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | SystemError | A system error occurred. Please contact the administrator. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.