GetAgentStatistics
Obtain agent-level statistics under hotline monitoring. Supports querying by instance, time range, agent, and department group.
Operation description
Before invoking this API, ensure that you have activated the service and created an instance.
If you need to specify agent or department information, refer to the guidance in the Request Parameters section.
queries per second (QPS) limit
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 UNIX timestamp, in 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. |
20 |
| CurrentPage |
integer |
No |
Current page number. 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. |
123 |
|
| 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 |
|
| TimeLatitudeType |
string |
No |
Time latitude type. Valid values:
|
minute |
| ExistDepartmentGrouping |
boolean |
No |
Indicates whether to query by department grouping. Valid values:
|
false |
| ExistAgentGrouping |
boolean |
No |
Whether to query by agent group. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Request ID. |
EE338D98-9BD3-4413-B165 |
| Message |
string |
Description of the status code. |
successful |
| Data |
object |
Data list. |
|
| TotalNum |
integer |
Total number of records. |
4 |
| PageNum |
integer |
Current page number. |
1 |
| PageSize |
integer |
Page size. |
2000 |
| Rows |
string |
Information is a JSON string of type List |
{"n_resttype_1":15,"t_outcall_speak":829747,"average_incoming_time":"8451.29","n_resttype_3":0,"minute_id":"-1","n_conference_speak":0,"n_resttype_2":0,"n_resttype_5":0,"n_resttype_4":0,"n_resttype_7":0,"n_resttype_6":0,"n_resttype_9":0,"n_resttype_8":0,"n_outcall_dial":25,"total_break_time":"58555","n_internal_speak":0,"n_send_step_transfer":7,"n_consulted_internal_speak":0} |
| Code |
string |
Status code. A return value of 200 indicates that the request succeeded. |
200 |
| Success |
string |
Indicates whether the API was invoked successfully. Valid values:
|
true |
Description of the Rows parameter in the response:
t_incall_ring: Incoming ring duration
t_incall_speak: Incoming call duration
t_outcall_dial: Dial-up duration (external)
t_outcall_speak: Outgoing call duration
t_internal_dial: Internal dial-up duration
t_internal_speak: Internal call duration
t_internal_ring: Internal ring duration
t_consult_internal_speak: Consultation duration (internal)
t_consulted_internal_ring: Ring duration when consulted (internal)
t_consulted_internal_speak: Duration when consulted (internal)
t_consult_external_speak: Consultation duration (external)
t_conference_speak: Conference duration
t_hold: Hold duration
t_held: Duration held by others
t_login: Logon duration
t_resttype_1: Regular break duration
t_resttype_2: Meal break duration
t_resttype_3: Meeting break duration
t_resttype_4: Coaching break duration
t_resttype_5: Training break duration
t_resttype_98: System-forced break duration
t_resttype_99: Agent sign-in break duration
t_idle: Idle duration
t_acw: Post-processing duration (outbound)
t_outcall_acw_end: Outbound post-processing duration
t_incall_acw_end: Inbound post-processing duration
n_incall_ring: Number of incoming rings
n_incall_speak: Number of incoming calls
n_outcall_dial: Number of dial-up attempts (external)
n_outcall_speak: Number of outgoing calls
n_internal_dial: Number of internal dial-up attempts
n_internal_speak: Number of internal calls
n_internal_ring: Number of internal rings
n_consult_internal_dial: Number of consultation requests initiated (internal)
n_consult_internal_speak: Number of consultations (internal)
n_consulted_internal_ring: Number of rings received during consultation (internal)
n_consulted_internal_speak: Number of times consulted (internal)
n_consult_external_dial: Number of consultation requests initiated (external)
n_consult_external_speak: Number of consultations (external)
n_send_conference: Number of conferences initiated
n_conference_speak: Number of conferences
n_send_step_transfer: Number of single-step transfers initiated
n_send_finish_transfer: Number of two-step transfers
n_send_monitor_error: Number of failed monitoring attempts
n_hold: Number of holds
n_held: Number of times held by others
n_resttype_1: Number of regular breaks
n_resttype_2: Number of meal breaks
n_resttype_3: Number of meeting breaks
n_resttype_4: Number of coaching breaks
n_resttype_5: Number of training breaks
n_resttype_98: Number of system-forced breaks
n_resttype_99: Number of agent sign-in breaks
n_acw: Number of post-processing actions
n_outcall_acw_end: Number of post-processing actions for outbound calls
n_incall_acw_end: Number of post-processing actions for inbound calls
Examples
Success response
JSON format
{
"RequestId": "EE338D98-9BD3-4413-B165",
"Message": "successful",
"Data": {
"TotalNum": 4,
"PageNum": 1,
"PageSize": 2000,
"Rows": "{\"n_resttype_1\":15,\"t_outcall_speak\":829747,\"average_incoming_time\":\"8451.29\",\"n_resttype_3\":0,\"minute_id\":\"-1\",\"n_conference_speak\":0,\"n_resttype_2\":0,\"n_resttype_5\":0,\"n_resttype_4\":0,\"n_resttype_7\":0,\"n_resttype_6\":0,\"n_resttype_9\":0,\"n_resttype_8\":0,\"n_outcall_dial\":25,\"total_break_time\":\"58555\",\"n_internal_speak\":0,\"n_send_step_transfer\":7,\"n_consulted_internal_speak\":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.