Powered by Zoomin Software. For more details please contactZoomin

Cost Management - Developer Guide

Product category
Technology
Doc type
Version
Product lifecycle
This publication

Cost Management - Developer Guide: Retrieve usage by projectHrn

Retrieve usage by projectHrn

This tutorial shows how to get your usage using a project HRN. To find your project HRN, click the Projects Manager option in the platform launcher. A table of project HRNs are then displayed, 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::myrealm:project/my-project-0000 as the projectHrn.

    GET https://usage.bam.api.here.com/v2/usage/realms/org123456789/startDate=2021-07-01T10:39:51&endDate=2021-08-30T10:39:51&projectHrn=projectHrn=hrn:here:authorization::myrealm:project/my-project-0000

Parameters

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 history search.
endDate
required
string "date-time".
Example: endDate=yyyy-MM-dd'T'HH:mm:ss
End date for history 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 request returns the following sample response:

{
"total": 1,
"limit": 100,
"items": [
{
"realmId": "org123456789",
"billingSubscriptionId": "",
"billingChargeNumber": "",
"featureId": "hrn:here-dev:service::org123456789:routing-8:import",
"category": "LocationServices",
"name": "Route Import",
"valueDriver": "GB",
"usageTypeCode": "OLS-G-Route-Import",
"usageValue": 10.0000,
“projectHrn”: “hrn:here:authorization:org999029259:project/my-project-000,
"billableValue": 10.0000
}
],
"nextOffset": 0,
"lastOffset": 0
}{
"total": 1,
"limit": 100,
"items": [
{
"realmId": "org123456789",
"billingSubscriptionId": "",
"billingChargeNumber": "",
"featureId": "hrn:here-dev:service::org123456789:routing-8:import",
"category": "LocationServices",
"name": "Route Import",
"valueDriver": "GB",
"usageTypeCode": "OLS-G-Route-Import",
"usageValue": 10.0000,
“projectHrn”: “hrn:here:authorization:org999029259:project/my-project-000,
"billableValue": 10.0000
}
],
"nextOffset": 0,
"lastOffset": 0
}

Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert