Get Usage Report
Get aggregated usage report for a billing period
Authorization<token>
Bearer token
In: header
X-Organization-ID<token>
Tenant or organization identifier
In: header
Query Parameters
subscriptionId?string
Required filters
metricId?string
Optional filters
billingPeriodStart?string
Billing period (if not provided, uses current billing period)
Format
date-timebillingPeriodEnd?string
Format
date-timeincludeBilled?boolean
Options
Include already billed records
Response Body
application/json
curl -X GET "https://api.nrings.io/v1/usage/report?subscriptionId&metricId&billingPeriodStart&billingPeriodEnd&includeBilled" \ -H "Authorization: Bearer {your_token}" \ -H "X-Organization-ID: {your_org_id}"{
"aggregates": [
{
"subscriptionId": "string",
"metricId": "string",
"metricName": "string",
"metricCode": "string",
"aggregationType": "AGGREGATION_TYPE_UNSPECIFIED",
"totalQuantity": "string",
"recordCount": 0,
"firstTimestamp": "2019-08-24T14:15:22Z",
"lastTimestamp": "2019-08-24T14:15:22Z",
"billingPeriodStart": "2019-08-24T14:15:22Z",
"billingPeriodEnd": "2019-08-24T14:15:22Z"
}
],
"billingPeriodStart": "2019-08-24T14:15:22Z",
"billingPeriodEnd": "2019-08-24T14:15:22Z",
"totalRecords": 0
}