Create CDR Export
Attention
Please note that the Inbound CDR export is available for current + 2 last months.
Description
Creates a single CDR Export. DIDWW performs deletion of CDR Export in 1 month after completion.
Forming Request
Request Method: POST
Request Path: /v3/cdr_exports
Request Body Object Attributes
Name |
Type |
Nullable |
Is Required? |
Description |
---|---|---|---|---|
filters |
False |
Yes |
Filters |
|
callback_url |
|
True |
Optional |
The HTTP or HTTPS endpoint to where events related to export will be delivered. |
callback_method |
|
True |
Optional |
The HTTP Method used for export events. POST, GET are supported methods. |
See Callback details for information about callback_url and callback_method.
Example
http
POST /v3/cdr_exports HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "cdr_exports",
"attributes": {
"filters": {
"year": "2017",
"month": "5",
"did_number": "123456789"
}
}
}
}
curl
curl -i -X POST https://api.didww.com/v3/cdr_exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"filters": {"did_number": "123456789", "month": "5", "year": "2017"}}, "type": "cdr_exports"}}'
response
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json
{
"data": {
"id": "9cccd228-2c1a-435f-b7eb-77ce6fc00a86",
"type": "cdr_exports",
"attributes": {
"filters": {
"year": "2017",
"month": "5",
"did_number": "123456789"
},
"status": "Pending",
"created_at": "2017-06-25T14:56:31.513Z",
"url": null
}
}
}
http
POST /v3/cdr_exports HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "cdr_exports",
"attributes": {
"callback_url": "http://example.com",
"callback_method": "GET",
"filters": {
"year": "2017",
"month": "5",
"did_number": "123456789"
}
}
}
}
curl
curl -i -X POST https://api.didww.com/v3/cdr_exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"callback_method": "GET", "callback_url": "http://example.com", "filters": {"did_number": "123456789", "month": "5", "year": "2017"}}, "type": "cdr_exports"}}'
response
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json
{
"data": {
"id": "3957b970-15c9-413b-b254-b074ccb6e9f2",
"type": "cdr_exports",
"attributes": {
"filters": {
"year": "2017",
"month": "5",
"did_number": "123456789"
},
"status": "Pending",
"created_at": "2021-09-06T16:31:30.773Z",
"url": null,
"callback_url": "http://example.com",
"callback_method": "GET"
}
},
"meta": {
"api_version": "2021-04-19"
}
}
Other Responses
Code |
Success |
Description |
---|---|---|
422 |
No |
|
401 |
No |