api:pbx:queue:stats
Table of Contents
API : PBX : Queue Statistics
Introduction
A Queue item is a dialplan call distribution entity with advanced features for members and callers.
Request
This request returns statistics for the queue.
| URL | https://api.telecomx.dk/pbx/queue/QUEUE_ID/stats | ||
|---|---|---|---|
| Method | GET | ||
| Access level | PERSONAL if user has access to the queue VIEWER, MANAGE, OWNER if queue items belongs to the customer RESELLER if customer belongs to the reseller ADMIN. |
||
| Params | QUEUE_ID | Id | Id of queue. |
| Query | date | Date | [optional] Date to show statistics for. Defaults to today. |
| toDate | Date | [optional] Date to show statistics until (and including). Defaults to today. |
|
| groupingInterval | String | [optional] How to group results - by MONTH, WEEK, DAY, HOUR or NONE. Defaults to NONE. |
|
| format | String | [optional] Data format: JSON, CSV, EXCEL. Defaults to JSON. |
|
Query examples
https://api.telecomx.dk/pbx/queue/123458789012457890ABCD/stats https://api.telecomx.dk/pbx/queue/123458789012457890ABCD/stats?date=2020-01-01 https://api.telecomx.dk/pbx/queue/123458789012457890ABCD/stats?date=2020-01-01T00.00.00.000Z https://api.telecomx.dk/pbx/queue/123458789012457890ABCD/stats?date=2020-01-01T00.00.00.000Z&toDate=2020-01-07T00.00.00.000Z&groupingInterval=DAY https://api.telecomx.dk/pbx/queue/123458789012457890ABCD/stats?date=2020-01-01T00.00.00.000Z&toDate=2020-01-07T00.00.00.000Z&groupingInterval=DAY&format=CSV
Response
Queue statistics, when groupingInterval is NONE.
| JSON object | ||
|---|---|---|
| _id | Id | Id of the queue. |
| name | String | Name of the queue. |
| date | Date | Date the statistics covers. |
| noMembers | Number | Number of calls that left the queue because there were no members. |
| allBusy | Number | number of calls that left the queue because all members were busy. |
| timeout | Number | Number of calls that left the queue because they waiting too long. |
| cancelled | Number | Number of calls that gave up. |
| answered | Number | Number of calls that was answered. |
| unanswered | Number | Number of call that was not answered (sum of noMembers, allBusy, timeout, cancelled). |
| total | Number | Total number of calls. |
| averageWaitTime | Number | Number of seconds answered calls on average waited. |
| averageTalkTime | Number | Number of seconds answered calls on average lasted. |
| totalTalkTime | Number | Number of seconds on calls. |
| longestWaitTime | Number | Number of seconds the longest wait time has been. |
| lastWaitTime | Number | Number of seconds the most recently answered call waited. |
| serviceLevel | Number | Percent of calls that meets the service level. |
| serviceLevelCritical | Number | Percent of calls that meets the critical service level. |
Example
{ _id: '12345678901234567890DADA', name: 'Support queue', date: '2020-01-01T00:00:00.000Z', noMembers: 0, allBusy: 0, timeout: 0, cancelled: 0, answered: 0, unanswered: 0, total: 0, averageWaitTime: 0, averageTalkTime: 0, totalTalkTime: 0, longestWaitTime: 0, lastWaitTime: 0, serviceLevel: 80, serviceLevelCritical: 95 }
Array of queue statistics, when groupingInterval is not NONE.
| JSON object | ||
|---|---|---|
| _id | Id | Id of the queue. |
| name | String | Name of the queue. |
| data | Array | Statistics data. |
| data[].interval | Number | Period the statistics covers: month, week, day or hour. |
| data[].noMembers | Number | Number of calls that left the queue because there were no members. |
| data[].allBusy | Number | number of calls that left the queue because all members were busy. |
| data[].timeout | Number | Number of calls that left the queue because they waiting too long. |
| data[].cancelled | Number | Number of calls that gave up. |
| data[].answered | Number | Number of calls that was answered. |
| data[].unanswered | Number | Number of call that was not answered (sum of noMembers, allBusy, timeout, cancelled). |
| data[].total | Number | Total number of calls. |
| data[].averageWaitTime | Number | Number of seconds answered calls on average waited. |
| data[].averageTalkTime | Number | Number of seconds answered calls on average lasted. |
| data[].totalTalkTime | Number | Number of seconds on calls. |
| data[].longestWaitTime | Number | Number of seconds the longest wait time has been. |
| data[].totalWaitTime | Number | Number of seconds callers has been waiting. |
| data[].serviceLevel | Number | Percent of calls that meets the service level. |
| data[].serviceLevelCritical | Number | Percent of calls that meets the critical service level. |
Example
{ _id: '12345678901234567890DADA', name: 'Support queue', data: [ { interval: 49, noMembers: 0, allBusy: 0, timeout: 0, cancelled: 0, answered: 0, unanswered: 0, total: 0, averageWaitTime: 0, averageTalkTime: 0, totalTalkTime: 0, longestWaitTime: 0, totalWaitTime: 0, serviceLevel: 100, serviceLevelCritical: 100 }, { interval: 50, noMembers: 0, allBusy: 0, timeout: 0, cancelled: 0, answered: 0, unanswered: 0, total: 0, averageWaitTime: 0, averageTalkTime: 0, totalTalkTime: 0, longestWaitTime: 0, totalWaitTime: 0, serviceLevel: 100, serviceLevelCritical: 100 }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | id | Queue not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/queue/stats.txt · Last modified: 2021/04/28 08:16 by Per Møller