Create a new cdr basic report
POST
/call_reports/create/cdr_basic
Generate a new cdr basic report.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.date_from
string
required
Start date for the exported call report, such as 08/28/2016 09:59:59.date_to
string
required
End date for the exported call report, such as 08/28/2016 09:59:59.format
string
required
CSV or XML.mail_to
string
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_status
string
required
Values could be "ANSWERED" or "NOT_ANSWERED".source
object
required
Show child attributesFilter the call reports by caller ID.destination
object
required
Show child attributesFilter the call reports by callee ID.duration
object
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_token
string
required
Access token is a 32-byte string with validity of 30 seconds.pagination
integer
required
The pagination of paging.pagesize
integer
required
The pagesize of paging.sort_by
enum
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
pagination
integer
required
The pagination of paging.pagesize
integer
required
The pagesize of paging.sort_by
enum
required
Values include "DEFAULT" and "Optional". Default value will be used when user has not specified value for this field.page_count
integer
required
The total count of pages.count
integer
required
Current pagesize.reports
array
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_token
string
required
Access token is a 32-byte string with validity of 30 seconds.report_id
string
required
Report ID that is returned in call_reports/list.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"report_id": "157eb957e774"
}
Response
Placeholders