Get catalog metadata

Catalog metadata contains a list of configurations that describe the catalog and its layers. Configuration information about the catalog includes the following metadata:

  • Name
  • HERE Resource Name (HRN)
  • Description
  • Owner
  • Version
  • Layer information

To get catalog metadata:

  1. Get an access key ID and access key secret.

    For instructions, see Authenticate to the HERE platform using client credentials.

  2. Create the OlpClientSettings instance.

    For instructions, see Create platform client settings.

  3. Create the CatalogClient object with the catalog HRN and platform client settings from step 2.

    const catalogClient = new CatalogClient(
      HRN.fromString("CatalogHRN"),
      settings
    );
    
  4. Create the CatalogRequest object.

    const request = new CatalogRequest().withBillingTag("MyBillingTag");
    
  5. Call the getCatalog method with the CatalogRequest parameter.

    const catalogMetadata = await catalogClient.getCatalog(request);
    

In browser and Node.js, to abort requests before they have completed, you can create the AbortController object, and then add the AbortController.signal property to your requests. For more information, see the AbortController documentation.

Example

const abortController = new AbortController();
const catalogMetadata = await catalogClient.getCatalog(
  request,
  abortController.signal
);

results matching ""

    No results matching ""