Create a new cdr basic report
POST
/call_reports/create/cdr_basic
Generate a new cdr basic report.
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.date_fromstring
required
Start date for the exported call report, such as 08/28/2016 09:59:59.date_tostring
required
End date for the exported call report, such as 08/28/2016 09:59:59.formatstring
required
CSV or XML.mail_tostring
required
Email address to which the linkage for downloading the exported call reports will be sent. This parameter must be set to enable proper work of SMTP server.call_statusstring
required
Values could be "ANSWERED" or "NOT_ANSWERED".sourceobject
required
Show child attributesFilter the call reports by caller ID.destinationobject
required
Show child attributesFilter the call reports by callee ID.durationobject
optional
Show child attributesFilter the call reports by call duration.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"date_from": "08/28/2016 09:59:59",
"date_to": "08/28/2016 09:59:59",
"format": "CSV",
"mail_to": "123@123.com",
"call_status": "ANSWERED",
"source": {
"source_type": "ANY",
"source_value": ""
},
"destination": {
"dest_type": "ANY",
"dest_value": ""
},
"duration": {
"duration_from": 1,
"duration_to": 100
}
}
Response
Placeholders
Sample Response
Retrive a list of call logs
GET
/call_reports/list
Retrieves a list of call logs, and a maximum of 100 records will be returned each time.
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.paginationinteger
required
The pagination of paging.pagesizeinteger
required
The pagesize of paging.sort_byenum
required
Values include "DEFAULT" and "Optional". Default value will be used when user has not specified value for this field.
Sample Request
https://example.com/api/call_reports/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT
Response
Placeholders
paginationinteger
required
The pagination of paging.pagesizeinteger
required
The pagesize of paging.sort_byenum
required
Values include "DEFAULT" and "Optional". Default value will be used when user has not specified value for this field.page_countinteger
required
The total count of pages.countinteger
required
Current pagesize.reportsarray
required
Show child attributesCollection of report objects.
Sample Response
{
"pagination": 1,
"pagesize": 100,
"sort_by": "DEFAULT",
"page_count": 100,
"count": 100,
"reports": [
{
"id": "1234aaa",
"name": "1234qqqq",
"type": "cdr_basic",
"frequency": null,
"status": null
}
]
}
Remove a report
POST
/call_reports/destroy
Delete a call report.
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.report_idstring
required
Report ID that is returned in call_reports/list.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"report_id": "157eb957e774"
}
Response
Placeholders