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
1POST /v3/cdr_exports HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "type": "cdr_exports",
10 "attributes": {
11 "filters": {
12 "year": "2017",
13 "month": "5",
14 "did_number": "123456789"
15 }
16 }
17 }
18}
curl
1curl -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
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "9cccd228-2c1a-435f-b7eb-77ce6fc00a86",
7 "type": "cdr_exports",
8 "attributes": {
9 "filters": {
10 "year": "2017",
11 "month": "5",
12 "did_number": "123456789"
13 },
14 "status": "Pending",
15 "created_at": "2017-06-25T14:56:31.513Z",
16 "url": null
17 }
18 }
19}
http
1POST /v3/cdr_exports HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "type": "cdr_exports",
10 "attributes": {
11 "callback_url": "http://example.com",
12 "callback_method": "GET",
13 "filters": {
14 "year": "2017",
15 "month": "5",
16 "did_number": "123456789"
17 }
18 }
19 }
20}
curl
1curl -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
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "3957b970-15c9-413b-b254-b074ccb6e9f2",
7 "type": "cdr_exports",
8 "attributes": {
9 "filters": {
10 "year": "2017",
11 "month": "5",
12 "did_number": "123456789"
13 },
14 "status": "Pending",
15 "created_at": "2021-09-06T16:31:30.773Z",
16 "url": null,
17 "callback_url": "http://example.com",
18 "callback_method": "GET"
19 }
20 },
21 "meta": {
22 "api_version": "2021-04-19"
23 }
24}
Other Responses#
Code |
Success |
Description |
|---|---|---|
422 |
No |
|
401 |
No |