Get started

Note

In this section, the term "realm" means "organization". See Manage your organization.

An organization (org) scopes all the users, apps, and resources within the same security namespace. When you log into the HERE platform as a user, you must enter your organization ID.

This section outlines how to quickly get started using the Cost Management APIs (Quota and Usage APIs):

Note

This section provides information on the minimum setup required to quickly begin managing your costs. For more detailed information on account setup, app registration, and authentication, see the Identity & Access Management Developer Guide.

Get a HERE account

In order to access the HERE platform Cost Management API, you need to obtain a account. Learn more at Get a HERE account.

Get credentials

To use the REST API, you need to have a credentials.properties file. You can obtain this file from platform.here.com. Once you have your credentials properties file, make sure to put it in this folder on your computer:

~/.here/credentials.properties

For more information about obtaining a credentials.properties file, see the Identity and Access Management Guide

Register your app

To register your app, follow the steps in Identity and Access Management Guide-OAuth Tokens.

Now that your app is registered, you can get OAuth 2.0 tokens to authenticate requests. You must code your application to get an OAuth 2.0 token for each request to a HERE service.

Get an OAuth token

There are multiple ways to get a token:

Having followed one of the previous methods, you have successfully obtained a token to use to make REST requests to the Quota and Usage APIs. Include the token in the HTTP Authorization header of your REST requests as a bearer token:

Authorization: Bearer <token>

Send a request

Once you have created a HERE account and have your credentials, you can test them by sending any request. Include the token in the HTTP authorization header before you send the request. A successful response from your request verifies that your credentials are setup correctly. For example, the following is a short request which defines rules for your organization.

Get quota rules defined in your organization

Request

    GET https://quota.bam.api.here.com/v1/realms/{{realm}}/rules

Response

The following is a successful response to get the quota rules which are defined in your organization.

    HTTP 20O OK
{
  "total": 0,
  "limit": 100,
  "items": [
  ],
  "nextOffset": 0,
  "lastOffset": 0
}

Next steps

We encourage you to view the tutorials, which walk you through various cost scenarios, by explaining how to use the Quota API and the Usage API, starting with the simplist, Create quota rules. Parameters used in the tutorials and responses are described in detail in the API Reference.

results matching ""

    No results matching ""