Get Usage Reports query options (BETA)
GET/usage_reports/options
Get the Usage Reports options for querying usage, including the products available and their respective metrics and dimensions
Request
Query Parameters
product stringExamples:
Options (dimensions and metrics) for a given product. If none specified, all products will be returned.
Header Parameters
Authorization: Bearer <TOKEN> string
Responses
200: Successful
- application/json
400: Bad Request
- application/json
500: Internal Server Error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/usage_reports/options' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
{
"data": [
{
"product": "wireless",
"product_dimensions": "['mnc', 'mcc', 'sim_card_id', 'sim_group_name']",
"product_metrics": "['uplink_data_bytes','downlink_data','downlink_data_bytes','uplink_data','data_cost']",
"record_types": "null"
}
]
}
{
"errors": [
{
"code": "10003",
"title": "Metrics invalid values",
"detail": "Available metrics values for sip-trunking: connected,cost,completed,call_sec,attempted,billed_sec.",
"source": {
"pointer": "/title",
"parameter": "metrics"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10001"
}
}
]
}
{
"errors": [
{
"code": "10003",
"title": "Metrics invalid values",
"detail": "Available metrics values for sip-trunking: connected,cost,completed,call_sec,attempted,billed_sec.",
"source": {
"pointer": "/title",
"parameter": "metrics"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10001"
}
}
]
}