Get started with Cost Management
The following provides information on the minimum setup required to quickly begin managing the costs of your organization. An organization (org) contains all the users, apps, and resources within the same security namespace. You must enter your organization ID when signing in to the HERE platform.
Note
In this context, the term "realm" means "organization." For more information, see Manage your individual or organization platform account.
To quickly get started using cost management, follow these steps:
Step 1: Get a HERE account
Obtain access to the HERE platform through your organization administrator's invitation or contact us to get started.
- If your company has already established a HERE platform organization, contact your organization admin who can invite you to join the organization.
- If your company hasn’t established a HERE platform organization yet, contact us.
Step 2: Get credentials
The Cost Management Usage API requires a credentials.properties file, which you must put in the following folder on your computer:
~/.here/credentials.propertiesFor more information, see the Identity and Access Management - Developer Guide.
Step 3: Register your app
For information on how to register your app, see the Identity and Access Management - Developer Guide Now that you have registered your app, you can get OAuth 2.0 tokens to authenticate requests. You must code your app to get an OAuth 2.0 token for each request to a HERE service.
Get an OAuth 2.0 token
For information on how to get an OAuth 2.0 token, see the Identity and Access Management - Developer Guide.
Include the OAuth 2.0 - token in the HTTP authorization header of your requests as a bearer token:
Authorization: Bearer <token>”Step 4: Send a request
The following sample code shows how to send a usage request using a feature ID.
The sample code uses org123456789 for the realmId and hrn:here:service::org123456789:search-geocoding-1 as the featureId.
GET https://usage.bam.api.here.com/v2/usage/realms/org123456789?startDate=2021-07-01T10:39:51&endDate=2021-08-30T10:39:51&featureId=hrn:here:service::org123456789:search-geocoding-1Response HTTP 200 OK
The request returns the following sample response:
{
"total": 10,
"limit": 100,
"items": [
{
"realmId": "org123456789",
"billingSubscriptionId": "",
"billingChargeNumber": "",
"featureId": "hrn:here:service::org123456789:search-geocoding-1",
"category": "service",
"name": "Geocoder Autosuggest",
"valueDriver": "Transactions",
"usageValue": "10",
"billableValue": "10"
},
],
"nextOffset": 0,
"lastOffset": 0
}Next steps
View the tutorials in this document, which explain various cost management scenarios. For more information, see the Cost Management Usage API v2 API Reference.
Updated last month