Get APIs for an HRN

Most APIs act on a specific HRN, such as a catalog, schema, or pipeline.

Get All APIs for an HRN

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

  1. Obtain an authorization token. For instructions, see the Authentication and Authorization Developer's Guide.
  2. 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, and find the HRN of interest.

    Hint

    Instead of using the config API to look up an HRN you can use the Portal or Command Line Interface.

  3. Use this REST request to get the endpoints for the HRN:

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

The response will include Base URLs and parameters for the APIs for this 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 this request:

GET /lookup/v1/resources/<Catalog HRN>/apis HTTP/1.1
Host: api-lookup.data.api.platform.hereolp.cn
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.

  1. Obtain an authorization token. For instructions, see the Authentication and Authorization Developer's Guide.
  2. Use the config API to get the HRN of the entity you are interested in, such as a catalog.

    Hint

    Instead of using the config API to look up an HRN you can use the Portal or Command Line Interface.

  3. Use this REST request:

  GET /lookup/v1/resources/<Catalog HRN>/apis/<API Name>/<API Version> HTTP/1.1
  Host: api-lookup.data.api.platform.hereolp.cn
    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, this 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.hereolp.cn
Authorization: Bearer <Authorization Token>
Cache-Control: no-cache

The response is:

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

results matching ""

    No results matching ""