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

CDR Export Filters Object

False

Yes

Filters

callback_url

string

True

Optional

The HTTP or HTTPS endpoint to where events related to export will be delivered.

callback_method

string

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

integer

Yes

Year of the CDR timestamp.

month

integer

Yes

Month of the CDR timestamp.

did_number

string

Optional

CDR export for a specified DID number. If the ‘did_number’ parameter is not used, CDRs are exported for all owned DID numbers.

Example

http

POST /v3/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": "exports",
    "attributes": {
      "export_type": "cdr_in",
      "filters": {
        "year": "2021",
        "month": "12",
        "did_number": "123456789"
      }
    }
  }
}

curl

curl -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

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "33bdfff7-4de3-4c58-8c90-b99930fb984a",
    "type": "exports",
    "attributes": {
      "status": "Pending",
      "created_at": "2021-12-16T06:39:44.465Z",
      "url": null,
      "callback_url": null,
      "callback_method": null,
      "export_type": "cdr_in"
    }
  },
  "meta": {
    "api_version": "2022-05-10"
  }
}

Other Responses

Code

Success

Description

422

No

Unprocessable Entity

401

No

Unauthorized