Get CDR Download Setting (v2.0)

Query CDR download setting.

Note: This interface is only available in API version 2.0.

Request URL

GET {base_url}/{api_path}/cdr/getdownloadoption?access_token={access_token}

Request parameters

No request parameters. Send the request URL directly to get CDR download setting.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
data Object<Download_Setting> The CDR download setting.
Download_Setting
Parameter Type Description
range String The download range for CDR.
  • list: Only list data.
  • transaction: Only call leg data.
  • list_transaction: List and call leg data.
  • all: List, call leg, and timeline data.
format String The download format for CDR.
  • csv
  • xls
  • pdf
  • html
duration_format String The display format for all duration-related fields.
  • seconds
  • hhmmss
export_column String The fields to export.
  • all
  • selected

Examples

Request example

GET /openapi/v2.0/cdr/getdownloadoption?access_token=IzmC16oK0Z9loUCnZoYgIXnCSEU4VYR2 HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "data": {
        "range": "list_transaction",
        "format": "pdf",
        "duration_format": "hhmmss",
        "export_column": "all"
    }
}