Get APIs for an HRN

Most APIs act on a specific HRN, such as a catalog, schema, or pipeline. This section outlines how to to request API information using an HRN.

Note

The api-lookup service is a platform service used exclusively with the Data API. For more information on using the Data API, see the Data API Guide.

Get all APIs for an HRN

Given an HRN, you can get the base URL and parameters for the APIs that service that HRN.

To get all APIs for an HRN, follow these steps:

  1. Obtain an OAuth token. For instructions on how to obtain an OAuth token, see the Identity & Access Management Guide.

Note

If you do not know the HRN of the entity you are interested in, use the config API to get a list of HRNs you have access to in order to find the HRN. You can also use the Command Line Interface to look up an HRN.

  1. Send the following REST request to get the endpoints for the HRN:

    GET /lookup/v1/resources/<HRN>/apis HTTP/1.1
    Host: api-lookup.data.api.platform.here.com
    Authorization: Bearer <Authorization Token>
    Cache-Control: no-cache
    

The response will include Base URLs and parameters for the APIs for the HRN.

Note

The base URL for each API has the following structure: {hostname}/{API base path}.

For example, you can get all the APIs for a catalog using the following request:

GET /lookup/v1/resources/<Catalog HRN>/apis HTTP/1.1
Host: api-lookup.data.api.platform.here.com
Authorization: Bearer <Authorization Token>
Cache-Control: no-cache

Get an API for an HRN

You can get the base URL and parameters for a specific API if you know the HRN, API name, and version.

To get an API for a known HRN, follow these steps:

  1. Obtain an OAuth token. For instructions on how to obtain an OAuth token, see the Identity & Access Management Guide.

Note

If you do not know the HRN of the entity you are interested in, use the config API to get a list of HRNs you have access to in order to find the HRN. You can also use the Command Line Interface to look up an HRN.

  1. Send the following REST request:

    GET /lookup/v1/resources/<Catalog HRN>/apis/<API Name>/<API Version> HTTP/1.1
    Host: api-lookup.data.api.platform.here.com
    Authorization: Bearer <Authorization Token>
    Cache-Control: no-cache
    

The response is the Base URL and parameters for the API.

Note

The base URL for each API has the following structure: {hostname}/{API base path}.

For example, the following request gets version 1 of the publish API.

GET /lookup/v1/resources/<Catalog HRN>/apis/publish/v2 HTTP/1.1
Host: api-lookup.data.api.platform.here.com
Authorization: Bearer <Authorization Token>
Cache-Control: no-cache

The response is:

{
    "api": "publish",
    "version": "v2",
    "baseURL": "https://publish.data.api.platform.here.com/publish/v2/catalogs/<Catalog HRN>",
    "parameters": {}
}

results matching ""

    No results matching ""