Get Catalog and Layer Configuration

Catalog configuration information describes the catalog and the layers in the catalog. Examples of configuration information include the catalog name, HERE Resource Name (HRN), description, and owner. Configuration information about the layers in the catalog include each layer's type, HRN, and schema.

One situation where you need to get catalog configuration is when you are constructing a process to publish or consume data. Since the REST services for publishing and consuming data require you to provide certain configuration information in the request, you need to get the catalog configuration before making the publish or consume request.

This topic provides an overview of how to get configuration information using the config API. For complete information on using the config API, see the API Reference.

  1. Obtain an authorization token. For instructions, see Get Started.
  2. Use the API Lookup service to get the API endpoint for the config API. For instructions, see the API Lookup Developer's Guide.
  3. In order to get a catalog's configuration you must have the catalog's HRN. You can find a catalog's HRN using the HERE platform portal (see Explore Data), or by using the config API to get a list of catalogs:
    GET /<Base path for the config API from the API Lookup Service>/catalogs HTTP/1.1
    Host: <Hostname for the config API from the API Lookup Service>
    Authorization: Bearer <Authorization Token>
    Cache-Control: no-cache
    
  4. Once you have the catalog's HRN, use the config API to get the catalog's configuration, including the layer metadata for the layers in the catalog:
    GET /<Base path for the config API from the API Lookup Service>/catalogs/<Catalog HRN> HTTP/1.1
    Host: <Hostname for the config API from the API Lookup Service>
    Authorization: Bearer <Authorization Token>
    Cache-Control: no-cache
    

For complete information on using the config service, see the API Reference.

Example

Here is an example in Java of how to get the catalog configuration for the HERE Live Weather Western Archive Europe catalog.

HTTP
curl
GET /config/v1/catalogs/<Catalog HRN> HTTP/1.1
Host: config.data.api.platform.hereolp.cn
Authorization: Bearer ABCDEfghiJkLMNOpQrSTUvWXyz1234567890
Cache-Control: no-cache
curl -X GET https://config.data.api.platform.hereolp.cn/config/v1/catalogs/<Catalog HRN> \
-H 'Authorization: Bearer ABCDEfghiJkLMNOpQrSTUvWXyz1234567890'
-H 'Cache-Control: no-cache'

Here is the response. The catalog configuration is provided, including the catalog ID, HRN, and name. In addition, the layer metadata is provided for the two layers in the catalog, "Time Stamp Index" and "Live Weather Archive Western Europe".

{
    "id": "live-weather-archive-eu",
    "hrn": "<Catalog HRN>",
    "name": "HERE Live Weather Archive Western Europe",
    "summary": "This catalog contains Western Europe historical weather data with specialized pavement attributes that can be useful for advanced automotive use cases.",
    "description": "This catalog contains Western Europe historical weather data with specialized pavement attributes that can be useful for advanced automotive use cases.\n\nAttributes in this catalog include:\n\n    Air temperature\n    Dew point temperature\n    Humidity\n    Air Pressure\n    Visibility\n    Precipitation type (rain, snow, ice)\n    Intensity Of Precipitation\n    Pavement condition (slippery frost, packed snow, black ice …)\n    Pavement temperature\n    Wind speed and direction",
    "coverage": {
        "adminAreas": [
            "ES",
            "LU",
            "BE",
            "FI",
            "NO",
            "CH",
            "SE",
            "GB",
            "FR",
            "DK",
            "NL",
            "DE"
        ]
    },
    "owner": {
        "organisation": {
            "id": "olp-here"
        }
    },
    "tags": [
        "WeatherHistory"
    ],
    "billingTags": [],
    "created": "2017-11-07T21:43:50.563Z",
    "layers": [
        {
            "id": "timestamp-index",
            "hrn": "<Catalog HRN>",
            "name": "Time Stamp Index",
            "summary": "This layer maintains an index of the data that is stored in this Catalog. A version number is assigned for each data slice stored.",
            "description": "This layer maintains an index of the data that is stored in this Catalog. A version number is assigned for each data slice stored.",
            "coverage": {
                "adminAreas": [
                    "ES",
                    "LU",
                    "BE",
                    "FI",
                    "NO",
                    "CH",
                    "SE",
                    "GB",
                    "FR",
                    "DK",
                    "NL",
                    "DE"
                ]
            },
            "owner": {
                "organisation": {
                    "id": "olp-here"
                }
            },
            "partitioningScheme": "generic",
            "partitioning": {
                "scheme": "generic"
            },
            "contentType": "text/plain",
            "volume": {
                "volumeType": "durable"
            },
            "tags": [
                "TimeStamp"
            ],
            "billingTags": [],
            "created": "2017-11-07T22:20:02.004Z",
            "layerType": "versioned"
        },
        {
            "id": "archived-data",
            "hrn": "<Catalog HRN>",
            "name": "Live Weather Archive Western Europe",
            "summary": "This layer contains Western Europe historical weather data with specialized pavement attributes that can be useful for advanced automotive use cases.",
            "description": "This layer contains Western Europe historical weather data with specialized pavement attributes that can be useful for advanced automotive use cases.\n\nAttributes in this catalog include:\n\n    Air temperature\n    Dew point temperature\n    Humidity\n    Air Pressure\n    Visibility\n    Precipitation type (rain, snow)\n    Intensity Of Precipitation\n    Pavement condition (slippery frost, packed snow, black ice …)\n    Pavement temperature\n    Wind speed and direction",
            "coverage": {
                "adminAreas": [
                    "ES",
                    "LU",
                    "BE",
                    "FI",
                    "NO",
                    "CH",
                    "SE",
                    "GB",
                    "FR",
                    "DK",
                    "NL",
                    "DE"
                ]
            },
            "owner": {
                "organisation": {
                    "id": "olp-here"
                }
            },
            "schema": {
                "hrn": "<Schema HRN>"
            },
            "partitioningScheme": "heretile",
            "partitioning": {
                "tileLevels": [
                    8
                ],
                "scheme": "heretile"
            },
            "contentType": "application/x-protobuf",
            "volume": {
                "volumeType": "durable"
            },
            "tags": [
                "WeatherHistory",
                "ArchivedWeather"
            ],
            "billingTags": [],
            "created": "2017-11-07T22:32:26.694Z",
            "layerType": "versioned"
        }
    ],
    "version": 17
}

results matching ""

    No results matching ""