Export Platform CDRs
Triggers an export task and exports the platform CDRs that match the filter conditions.
Request URL
POST {base_url}/uc-creport/api/v1/platform/cdr/export
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code No String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description tenantCodes No Array<String> The list of tenant codes to filter by. If not specified, CDRs of all visible tenants are exported. startTimeFrom No String The start of the call time range, in Unix timestamp format (microseconds). startTimeTo No String The end of the call time range, in Unix timestamp format (microseconds). uid No String The UID of the CDR to filter by. callTypes No Array<String> The list of call types to filter by.
Valid value:
inbound: Inbound calls.outbound: Outbound calls.internal: Internal calls.
callFrom No String The caller number or name to search for. callTo No String The callee number or name to search for. secondParticipant No String The number or name of the second participant to search for. lastParticipant No String The number or name of the last participant to search for. lastStatuses No Array<String> The list of final call statuses to filter by.
Valid value:
answeredno_answerabandonedbusyfailedvoicemail
sourceTrunks No Array<String> The list of source trunk names to filter by. destTrunks No Array<String> The list of destination trunk names to filter by. didNumbers No Array<String> The list of DID numbers to filter by. dodNumber No String The DOD number to filter by. callerIp No String The IP address of the caller to filter by. pinCode No String The PIN code to filter by. shakenAttestations No Array<String> The list of SHAKEN attestation levels to filter by.
Valid value:
ABCInvalidUnknownUnsigned
durationFormat Yes String The format of the duration in the exported file.
Valid value:
secondshhmmss
exportFields No String The range of the fields to export.
Valid value:
all: Export all fields.selected: Export the fields in selectedFields.
selectedFields No Array<Export_Field_Selection> The list of the fields to export. This parameter is valid only when exportFields is selected.viewType No String The range of the CDR data to export.
Valid value:
call_records: Export the main records only.call_legs: Export the call leg records only.
- Export_Field_Selection
-
Parameter Required Type Description key No String The identifier of the field to export, such as caller_numberandtenant_code.title No String The custom header title of the field in the exported file.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Trigger_Result> | The result of the request. |
- Trigger_Result
-
Parameter Type Description success Boolean Whether the export task is triggered successfully.
true: The task is triggered.false: The task fails to be triggered.
message String The message of the trigger result. taskId String The ID of the export task.
Example
Request example
POST /uc-creport/api/v1/platform/cdr/export HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzM2MDcxNCwiaWF0IjoxNzkzMzM5MTE0LCJqdGkiOiIwYzU4YTVjMS1hNTMwLTQ1MjUtOTMzMS1hMTQ1NzQ1MjkxZTQiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.rd9xVGzJcc2NyEZ1PJtMnMtmk4-ovkSPt7c1z75SvaND72UXsHLJ4pN-I83fEJRU06MFrSBRWsU4vUzaZ4nikEmUzHfuTuXARORPBf-SGvh65FwPR6nPB3a9DeWQVOToRukOE71hgJrY8n9d0z8W8wFFc8_7d0Uv4J9CZqZFK073YAhzoZCG6hQzsI_u9Z5MzGRiLbMotGM1YGejEOKCswE3MuiXy_Ka9bUNTw9ISlAYFl0V52_JXYGPmpc3zw-TWTK1J8FCMysvR4QD6KTPoY9MHOfzvD1GiQCWiFuuI2DipfxCWop5I4Lg1qzrXV5W-MVieZYaD0kwFcvmj78xOw
Content-Type: application/json
{
"tenantCodes": [
"jint"
],
"startTimeFrom": "1735689600000000",
"startTimeTo": "1798761600000000",
"durationFormat": "seconds",
"exportFields": "all",
"viewType": "call_records"
}
Response example
HTTP/1.1 200 OK { "requestId": "10734cbf1445c9a27dad08ad98021dd6", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "success": true, "message": "Export triggered", "taskId": "374433919152316416" } }