here.platform.api.data_config_api module
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)
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
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
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
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) dict
Creates a subscription between source catalog/layer and target catalog/layer
Parameters:
configuration_object – A subscription configuration object.
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
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
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) dict
Deletes a 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.
disable_automatic_version_deletion(catalog_hrn: str) dict
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
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]
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
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
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
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
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
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
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
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.