List Usage Records
List usage records with filters
Authorization<token>
Bearer token
In: header
X-Organization-ID<token>
Tenant or organization identifier
In: header
Query Parameters
subscriptionId?string
Filters
metricId?string
usageRecordStatus?string
Value in
"USAGE_RECORD_STATUS_UNSPECIFIED" | "USAGE_RECORD_STATUS_PENDING" | "USAGE_RECORD_STATUS_PROCESSED" | "USAGE_RECORD_STATUS_BILLED" | "USAGE_RECORD_STATUS_FAILED"startTime?string
Time range
Format
date-timeendTime?string
Format
date-timepage?integer
Pagination
Format
int32pageSize?integer
Format
int32Response Body
application/json
curl -X GET "https://api.nrings.io/v1/usage/records?subscriptionId&metricId&usageRecordStatus&startTime&endTime&page&pageSize" \ -H "Authorization: Bearer {your_token}" \ -H "X-Organization-ID: {your_org_id}"{
"usageRecords": [
{
"id": "string",
"quantity": "string",
"timestamp": "2019-08-24T14:15:22Z",
"billingPeriodStart": "2019-08-24T14:15:22Z",
"billingPeriodEnd": "2019-08-24T14:15:22Z",
"eventId": "string",
"properties": {},
"usageRecordStatus": "USAGE_RECORD_STATUS_UNSPECIFIED",
"errorMessage": "string",
"processedAt": "2019-08-24T14:15:22Z",
"externalId": "string",
"subscriptionId": "string",
"metricId": "string",
"invoiceId": "string",
"invoiceLineId": "string",
"subscriptionName": "string",
"metricName": "string",
"metricCode": "string",
"metadata": {},
"status": "STATUS_UNSPECIFIED",
"timestamps": {
"createTime": "2019-08-24T14:15:22Z",
"updateTime": "2019-08-24T14:15:22Z"
}
}
],
"totalCount": 0
}