Check out our upcoming events and meetups! View events →
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.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.reports.cdrUsageReports.fetchSync({
aggregation_type: 'NO_AGGREGATION',
product_breakdown: 'NO_BREAKDOWN',
});
console.log(response.data);{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_time": "2018-02-02T22:25:27.521Z",
"end_time": "2018-02-02T22:25:27.521Z",
"connections": [
1234567890,
9876543210
],
"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"
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
"2020-07-01T00:00:00-06:00"
"2020-07-01T00:00:00-06:00"
NO_AGGREGATION, CONNECTION, TAG, BILLING_GROUP "NO_AGGREGATION"
NO_BREAKDOWN, DID_VS_TOLL_FREE, COUNTRY, DID_VS_TOLL_FREE_PER_COUNTRY "NO_BREAKDOWN"
[1234567890123]Successful
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.reports.cdrUsageReports.fetchSync({
aggregation_type: 'NO_AGGREGATION',
product_breakdown: 'NO_BREAKDOWN',
});
console.log(response.data);{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_time": "2018-02-02T22:25:27.521Z",
"end_time": "2018-02-02T22:25:27.521Z",
"connections": [
1234567890,
9876543210
],
"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"
}
}