How to retrieve usage csv by projectHrn
This tutorial shows how to get your usage in CSV format using the projectHrn. You can find your project HRN in the platform launcher by selecting the Projects Manager option. A table of project HRNs displays, and you can find the correct project HRN for your request in the list.
This sample request uses org123456789 as the realmId, 2021-07-01T10:39:51 as the startDate, 2021-08-30T10:39:51 as the endDate, and hrn:here:authorization::myorganization:project/my-project-0000 as the projectHrn.
GET https://usage.bam.api.here.com/v2/usage/realms/org123456789/csv?startDate=2021-07-01T10:39:51&endDate=2021-08-30T10:39:51&projectHrn=hrn%3Ahere%3Aauthorization%3A%3Amyrealm%3Aproject%2Fmy-project-0000Parameters
The parameters shown here are only those required for this sample request. For a complete list of parameters, see the Cost Management Usage API v2 API Reference.
| realmId required | string [ 5 .. 30 ] characters. Example: org123456789 Your org ID. |
| startDate required | string "date-time". *Example:*startDate=yyyy-MM-dd'T'HH:mm:ss Start date for a search. |
| endDate required | string "date-time". *Example:*endDate=yyyy-MM-dd'T'HH:mm:ss End date for a search. |
| projectHrn | string less than or equal to 256 characters. *Example:*projectHrn=hrn:here:authorization::myrealm:project/my-project-0000 The HRN which identifies the project. |
Header parameters
| X-Request-ID | string User-provided token to trace a request or a group of requests sent to the service. |
| X-Correlation-ID required | string Auto-generated ID, which uniquely identifies the request, available in the response. When contacting the support team with an inquiry regarding a specific request, provide the value of this header. This helps when troubleshooting the issue. |
Response: HTTP 200 OK
The response in CSV format lists the following columns:
- Category (
category): The category is the name of the billable service you have selected, such as location services, content, SDKs, data, or pipelines. - Service or Resource Name: The service, such as Navigate SDK, Network Positioning, 3D Buildings.
- Billing Tag (
billingTag): a user defined unique string used for combining costs. - Project ID (
projectHrn): (Optional) A unique identifier to manage work and resources. This is also known as the project HRN. - Start date (
startDate): The start date of the usage. - End date (
endDate): The end date of the usage. - Usage amount (
billableValue): How much billable usage has accrued. - Unit (
valueDriver): The unit which is billable, for example GB. - Rate per Unit: The billable rate per unit.
- Total Price: The calculated cost of your usage.
For partners, an additional column in the CSV output. The additional column is the name of the organization, which is the orgName parameter.
Updated last month