Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

GetUsageReportSync

GET 
/reports/cdr_usage_reports/sync

Generate and fetch voice usage report synchronously. This endpoint will both generate and fetch the voice report over a specified time period. No polling is necessary but the response may take up to a couple of minutes.

Request

Query Parameters

    start_date date-time
    end_date date-time
    aggregation_type stringrequired

    Possible values: [NO_AGGREGATION, CONNECTION, TAG, BILLING_GROUP]

    product_breakdown stringrequired

    Possible values: [NO_BREAKDOWN, DID_VS_TOLL_FREE, COUNTRY, DID_VS_TOLL_FREE_PER_COUNTRY]

    connections number[]

Responses

200: Successful

Request samples


curl -L 'https://apidev.telnyx.com/v2/reports/cdr_usage_reports/sync' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'

Response samples


{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"start_time": "2018-02-02T22:25:27.521Z",
"end_time": "2018-02-02T22:25:27.521Z",
"connections": "[1234567890L, 9876543210L]",
"aggregation_type": "NO_AGGREGATION",
"status": "PENDING",
"report_url": "http://portal.telnyx.com/downloads/report_name_8hvb45Gu.csv",
"result": {},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"record_type": "cdr_usage_report",
"product_breakdown": "NO_BREAKDOWN"
}
}