The Usage API allows you to query usage for your organization and retrieve the usage in csv format as shown here.
This example uses org123456789 as the realmId.
|realmId required||string [ 5 .. 30 ] characters |
Your org ID.
Start date for history search.
End date for history search.
|featureId||string less than or equal to 256 characters |
|appId||string less than or equal to 128 characters |
Client application ID. This is the application ID which was created in the platform.
Enum: "hot" "cold"
When this parameter is provided, the results are filtered by the ID identifying the channel for the usage reporting.
|projectHrn||string less than or equal to 256 characters |
The HRN which identifies the project.
|billingTag||string less than or equal to 500 characters |
|category||string less than or equal to 128 characters |
|limit||integer [ 1 .. 100 ] |
Number of records to return. The default and maximum is 100 records.
|offset||integer >= 0 |
Offset page number. The default value is 0.
Enum: "summarized" "hour" "day" "month"
This query parameter controls granularity of records at the levels of summarized, hour, day, or month. By default, detailLevel is set to summarized, which means the granularity is at the search criteria level. The usageDateTime field value is not present if detailLevel is set to summarized.
|groupBy||string less than or equal to 256 characters |
Example: groupBy=appId, billingTag, project, resource, usageTypeCode
Comma seperated list of groupBy. Supported values are project, billingTag, usageTypeCode, and appId. The default groupBy is featureId and subscription ID. The groupBy query parameter controls the additional dimensions included in a response. By default, usage records are grouped by featureId (charge Item) and subscription ID, which means that the only dimensions included are featureId and subscription ID. When additional groupBy are added through the query parameter, it is in addition to featureId and subscription ID.
|usageFields||Array of strings unique |
Items Enum: "realmId" "featureId" "billingSubscriptionId" "billingChargeNumber" "category" "name" "valueDriver" "usageValue" "billableValue"
A set of unique/distinct usage field names which are allowed to filter response objects properties.
User-provided token that can be used to trace a request or a group of requests sent to the service.
Auto-generated ID, which uniquely identifies the request, available in the response. When contacting the support with an inquiry regarding a specific request, provide the value of this header; This will help troubleshooting the issue.