curl --request GET \
--url https://api.example.com/api/v1/usage/subscription/{subscription_id} \
--header 'Authorization: Bearer <token>'{
"period_end": "2023-12-25",
"period_start": "2023-12-25",
"usage": [
{
"grouped_usage": [
{
"dimensions": {},
"value": "<string>"
}
],
"metric_code": "<string>",
"metric_id": "<string>",
"metric_name": "<string>",
"total_value": "<string>"
}
]
}Retrieve aggregated usage data for a subscription’s usage-based components. If start_date/end_date are omitted, defaults to the current billing period.
curl --request GET \
--url https://api.example.com/api/v1/usage/subscription/{subscription_id} \
--header 'Authorization: Bearer <token>'{
"period_end": "2023-12-25",
"period_start": "2023-12-25",
"usage": [
{
"grouped_usage": [
{
"dimensions": {},
"value": "<string>"
}
],
"metric_code": "<string>",
"metric_id": "<string>",
"metric_name": "<string>",
"total_value": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Subscription ID
"sub_7n42DGM5Tflk9n8mt7Fhc7"