Create Export#
Attention
Please note that the Inbound/Outbound CDR export is available for current + 2 last months.
Description
Creates a single Export. DIDWW performs deletion of CDR Export in 1 month after completion.
Forming Request#
Request Method: POST
Request Path: /v3/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.
Export Type Attributes:
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
year |
|
Yes |
Year of the CDR timestamp. |
month |
|
Yes |
Month of the CDR timestamp. |
did_number |
|
Optional |
CDR export for a specified DID number. If the ‘did_number’ parameter is not used, CDRs are exported for all owned DID numbers. |
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
year |
|
Yes |
Year of the CDR timestamp. |
month |
|
Yes |
Month of the CDR timestamp. |
day |
|
Yes |
Day of the CDR timestamp. |
voice_out_trunk.id |
|
Yes |
ID of voice out trunk |
Example#
http
1POST /v3/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": "exports",
10 "attributes": {
11 "export_type": "cdr_in",
12 "filters": {
13 "year": "2021",
14 "month": "12",
15 "did_number": "123456789"
16 }
17 }
18 }
19}
curl
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"export_type": "cdr_in", "filters": {"did_number": "123456789", "month": "12", "year": "2021"}}, "type": "exports"}}'
response
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "33bdfff7-4de3-4c58-8c90-b99930fb984a",
7 "type": "exports",
8 "attributes": {
9 "status": "Pending",
10 "created_at": "2021-12-16T06:39:44.465Z",
11 "url": null,
12 "callback_url": null,
13 "callback_method": null,
14 "export_type": "cdr_in"
15 }
16 },
17 "meta": {
18 "api_version": "2021-12-15"
19 }
20}
http
1POST /v3/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": "exports",
10 "attributes": {
11 "callback_url": "http://example.com",
12 "callback_method": "GET",
13 "export_type": "cdr_in",
14 "filters": {
15 "year": "2021",
16 "month": "12",
17 "did_number": "123456789"
18 }
19 }
20 }
21}
curl
1curl -i -X POST https://api.didww.com/v3/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", "export_type": "cdr_in", "filters": {"did_number": "123456789", "month": "12", "year": "2021"}}, "type": "exports"}}'
response
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "d4f37476-8ece-4add-bbcb-cc72a7908fe2",
7 "type": "exports",
8 "attributes": {
9 "status": "Pending",
10 "created_at": "2021-12-16T06:54:30.122Z",
11 "url": null,
12 "callback_url": "http://example.com",
13 "callback_method": "GET",
14 "export_type": "cdr_in"
15 }
16 },
17 "meta": {
18 "api_version": "2021-12-15"
19 }
20}
http
1POST /v3/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": "exports",
10 "attributes": {
11 "export_type": "cdr_out",
12 "filters": {
13 "year": "2021",
14 "month": "12",
15 "day": "12",
16 "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
17 }
18 }
19 }
20}
curl
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"export_type": "cdr_out", "filters": {"day": "12", "month": "12", "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753", "year": "2021"}}, "type": "exports"}}'
response
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "88a29a27-11fe-4db0-a508-eca1d7cf0b68",
7 "type": "exports",
8 "attributes": {
9 "status": "Pending",
10 "created_at": "2021-12-21T07:37:13.085Z",
11 "url": null,
12 "callback_url": null,
13 "callback_method": null,
14 "export_type": "cdr_out"
15 }
16 },
17 "meta": {
18 "api_version": "2021-12-15"
19 }
20}
http
1POST /v3/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": "exports",
10 "attributes": {
11 "export_type": "cdr_out",
12 "callback_url": "http://example.com",
13 "callback_method": "GET",
14 "filters": {
15 "year": "2021",
16 "month": "12",
17 "day": "12",
18 "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
19 }
20 }
21 }
22}
curl
1curl -i -X POST https://api.didww.com/v3/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", "export_type": "cdr_out", "filters": {"day": "12", "month": "12", "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753", "year": "2021"}}, "type": "exports"}}'
response
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "67e4f27f-d5eb-4b80-8924-39486aee6ed4",
7 "type": "exports",
8 "attributes": {
9 "status": "Pending",
10 "created_at": "2021-12-21T07:42:02.546Z",
11 "url": null,
12 "callback_url": "http://example.com",
13 "callback_method": "GET",
14 "export_type": "cdr_out"
15 }
16 },
17 "meta": {
18 "api_version": "2021-12-15"
19 }
20}
http
1POST /v3/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": "exports",
10 "attributes": {
11 "export_type": "cdr_out",
12 "filters": {
13 "year": "2021",
14 "month": "12",
15 "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753"
16 }
17 }
18 }
19}
curl
1curl -i -X POST https://api.didww.com/v3/exports -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"export_type": "cdr_out", "filters": {"month": "12", "voice_out_trunk.id": "457bf47d-446d-41cd-91c3-dfbda7bf0753", "year": "2021"}}, "type": "exports"}}'
response
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "88a29a27-11fe-4db0-a508-eca1d7cf0b68",
7 "type": "exports",
8 "attributes": {
9 "status": "Pending",
10 "created_at": "2021-12-21T07:37:13.085Z",
11 "url": null,
12 "callback_url": null,
13 "callback_method": null,
14 "export_type": "cdr_out"
15 }
16 },
17 "meta": {"api_version": "2021-12-15"}
18}
Other Responses#
Code |
Success |
Description |
|---|---|---|
422 |
No |
|
401 |
No |