Download CDR Files
Get a random string of the CDR file, then combine the random string with other parameters to form a download link.
Step to download a CDR file
- Get a random string through the API endpoint
/api/v1.1.0/cdr/get_random?token={token}
. - Combine the random string with other parameters to form a download link.
Endpoint
POST /api/v1.1.0/cdr/get_random?token={token}
Request Parameters
Name | Importance | Type | Description |
---|---|---|---|
extid |
Required | String | Specify which extensions' CDR to download.
|
starttime |
Required | String | Specify the start time to filter the CDR reports. Time
format: |
endtime |
Required | String | Specify the end time to filter the CDR reports. Time
format: |
allowedip |
Optional | String |
Specify the allowed IP address to download the file.
Note:
|
Response Parameters
Name | Type | Description |
---|---|---|
extid |
String | Extension number. |
starttime |
String | The start time to filter the CDR reports. |
endtime |
String | The end time to filter the CDR reports. |
random |
String | A random string created for downloading CDR file. The random string is a component of the CDR download link. |
Examples
Request ExamplePOST /api/v1.1.0/cdr/get_random?token=1e3b3ebb6a974cb42ed31de5413df52d HTTP/1.1 Content-Type:application/json; charset=utf-8 Host: 192.168.5.150 { "extid": "all", "starttime": "2018-11-07 00:00:00", "endtime": "2019-02-18 23:59:59" }
HTTP/1.1 200 OK Access-control-allow-origin: * Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE { "status": "Success", "extid": "all", "starttime": "2018-11-07 00:00:00", "endtime": "2019-02-18 23:59:59", "random": "0cbcf8917c41c61c6e9fd3e57ecdd467" }
CDR Download Link
Use the API responded random string as a component of a specific request address for downloading the CDR file. The CDR file is in CSV format. Check the descriptions of CDR parameters.CDR download link format:
https://{pbx ip}:{https port}/api/v1.1.0/cdr/download?extid={extid}&starttime={starttime}&endtime={endtime}&token={token}&random={random}
Download link example:https://192.168.5.150:8088/api/v1.1.0/cdr/download?extid=all&starttime=2018-11-27 00:00:00&endtime=2019-02-18 23:59:59&token=48400f35207bb9c330a0bdaf4a5633e2&random=0cbcf8917c41c61c6e9fd3e57ecdd467