here.platform.api.data_config_api module#

This module contains a DataConfigApi class to perform API operations.

The HERE API reference documentation used in this module can be found here: Config API Reference # noqa E501

class here.platform.api.data_config_api.DataConfigApi(platform_config: PlatformConfig, application_config: ApplicationConfig, auth: Auth | None, proxies: dict | None = None)[source]#

Bases: BaseApi

This class provides access to HERE platform Data Config APIs.

The config service provides basic catalog management operations. It manages all platform resources needed for different kinds of catalogs and operations on them.

catalog_exists(catalog_hrn: str, billing_tag: str | None = None) bool[source]#

Check whether a catalog with the specified HRN exists.

Parameters:
  • catalog_hrn – a HERE Resource Name

  • billing_tag – A string which is used for grouping billing records.

Returns:

Boolean value based on Http response

Raises:

PlatformException – If platform responds with an HTTP error.

check_subscription_exists(subscription_hrn: str) bool[source]#

Checks whether a subscription with the specified HRN exists.

Parameters:

subscription_hrn – The HERE Resource Name (HRN) of subscription

Returns:

True if subscription exists.

Raises:

PlatformException – If platform responds with an HTTP error.

create_catalog(data: Dict[str, Any], billing_tag: str | None = None) dict[source]#

Create a catalog.

Parameters:
  • data – a dict with a catalog metadata.

  • billing_tag – A string which is used for grouping billing records.

Returns:

a dict with the catalog creation status.

Raises:

PlatformException – If platform responds with an HTTP error.

create_subscription(configuration_object: dict, x_idempotency_key: str | None) dict[source]#

Creates a subscription between source catalog/layer and target catalog/layer

Parameters:
  • configuration_object – A subscription configuration object.

  • x_idempotency_key – is the unique value generated by client for create

subscription request. Following retry requests must have the same x-idempotency-key header value like first create subscription request and the same body content. If retry request body content will be different, then server will return 409 status code. Minimum length: 10, maximum length: 255.

Returns:

response from the API.

Raises:

PlatformException – If platform responds with an HTTP error.

delete_catalog(catalog_hrn: str, billing_tag: str | None = None) dict[source]#

Delete a catalog.

Parameters:
  • catalog_hrn – a HERE Resource Name.

  • billing_tag – a string which is used for grouping billing records.

Returns:

a dict with catalog deletion status.

Raises:

PlatformException – If platform responds with an HTTP error.

delete_layer(catalog_hrn: str, layer_id: str) dict[source]#

Delete a catalog layer.

Parameters:
  • catalog_hrn – a HERE Resource Name.

  • layer_id – a string which represents layer id.

Returns:

a dict with catalog layer deletion status.

Raises:

PlatformException – If platform responds with an HTTP error.

delete_subscription(subscription_hrn: str, x_idempotency_key: str | None) dict[source]#

Deletes a subscription associated with the HRN.

Parameters:
  • subscription_hrn – The HERE Resource Name (HRN) of subscription.

  • x_idempotency_key – is the unique value generated by client for create

subscription request. Following retry requests must have the same x-idempotency-key header value like first create subscription request and the same body content. If retry request body content will be different, then server will return 409 status code. Minimum length: 10, maximum length: 255.

Returns:

response from the API.

Raises:

PlatformException – If platform responds with an HTTP error.

disable_automatic_version_deletion(catalog_hrn: str) dict[source]#

Disable automatic retired versions cleanup.

Parameters:

catalog_hrn – a HERE Resource Name.

Returns:

a dict with catalog automatic version deletion status.

Raises:

PlatformException – If platform responds with an HTTP error.

get_catalog_details(catalog_hrn: str, billing_tag: str | None = None) dict[source]#

Get the full catalog configuration for the requested catalog.

Parameters:
  • catalog_hrn – a HERE Resource Name

  • billing_tag – A string which is used for grouping billing records.

Returns:

a dictionary with catalog details

Raises:

PlatformException – If platform responds with an HTTP error.

get_catalog_status(catalog_status_href: str, billing_tag: str | None = None) Tuple[dict, bool][source]#

Get the status of the catalog operations for the given token.

Parameters:
  • catalog_status_href – a catalog status href url.

  • billing_tag – A string which is used for grouping billing records.

Returns:

A tuple with dict with the status of the catalog/layer operation and bool set to True if the operation completed or False if the operation is still in progress.

Raises:

PlatformException – If platform responds with an HTTP error.

get_catalogs(**filters: str) dict[source]#

List (or search) catalogs and layers.

Parameters:

filters – a dictionary with search criteria as key/value pairs

Returns:

a dictionary with all catalog information found

Raises:

PlatformException – If platform responds with an HTTP error.

get_subscription(subscription_hrn: str) dict[source]#

Returns configuration of the subscription associated with the HRN.

Parameters:

subscription_hrn – The HERE Resource Name (HRN) of subscription

Returns:

response from the API.

Raises:

PlatformException – If platform responds with an HTTP error.

get_subscription_status(status_token: str) dict[source]#

Get the status of the subscription.

Parameters:

status_token – Status token from create/delete subscription response.

Returns:

response from the API.

Raises:

PlatformException – If platform responds with an HTTP error.

list_subscriptions(**filters: dict) dict[source]#

Lists all subscriptions that your account has access to.

Parameters:

filters – Http query params dict.

Returns:

response from the API.

Raises:

PlatformException – If platform responds with an HTTP error.

patch_catalog(catalog_hrn: str, data: Dict[str, Any]) dict[source]#

Modify or patch a catalog.

Parameters:
  • catalog_hrn – a HERE Resource Name.

  • data – body of the modify catalog request.

Returns:

a dict with catalog update status.

Raises:

PlatformException – If platform responds with an HTTP error.

patch_layer(catalog_hrn: str, layer_id: str, data: Dict[str, Any]) dict[source]#

Modify or patch a catalog layer.

Parameters:
  • catalog_hrn – a HERE Resource Name.

  • layer_id – a string which represents layer id.

  • data – body of the update catalog request.

Returns:

a dict with catalog layer update status.

Raises:

PlatformException – If platform responds with an HTTP error.

update_catalog(catalog_hrn: str, data: Dict[str, Any], billing_tag: str | None = None) dict[source]#

Update a catalog.

Parameters:
  • catalog_hrn – a HERE Resource Name.

  • data – body of the update catalog request.

  • billing_tag – A string which is used for grouping billing records.

Returns:

a dict with catalog update status.

Raises:

PlatformException – If platform responds with an HTTP error.