How to 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:
- Create the
OlpClientSettingsinstance.
For instructions, see Create platform client settings.
-
Create the
CatalogClientobject with the catalog HRN and platform client settings from step 1.const catalogClient = new CatalogClient( HRN.fromString("CatalogHRN"), settings ); -
Create the
CatalogRequestobject.const request = new CatalogRequest().withBillingTag("MyBillingTag"); -
Call the
getCatalogmethod with theCatalogRequestparameter.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
);Updated 14 days ago