JSON API » huntgroups » huntgroups/destinations/statistics
Gets call statistics for destinations in a hunt group.
Input parameters
Requires authentication and the user role privilege.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| huntgroup | Integer | ID of hunt group. | Yes | |
| start | Integer | Start Unix timestamp. | Recommended | 0 |
| end | Integer | End Unix timestamp. | Recommended | Now. |
The hunt group is specified in the "huntgroup" parameter rather than the "id" parameter to allow getting statistics for one destination in a future version. Failure to specify the start and end may put a heavy load on the database.
Responses
| Code | Description |
|---|---|
| 200 | Success. |
| 400 | Invalid input parameters specified. Check the key and message fields for more details. |
| 401 | The authentication details provided are invalid. |
| 402 | Your role does not allow this. |
| 404 | The hunt group does not exist, or you do not have permission to view it. |
Data returned
Fields of statistics.
Example: With required and recommended parameters
http://enswitch.example.com/api/json/huntgroups/destinations/statistics/?auth_username=user;auth_password=password;huntgroup=123;start=1230000000;end=1240000000{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "ctype":"number", "cnumber":"2125551234", ... } "data":{ "ctype":"phone", "cnumber":"1234567", ... } }
Change history
| Version | Changes |
|---|---|
| 3.13 | Function added. |
