here.platform.api.data_index_api module — HERE Data SDK for Python documentation
- Last UpdatedJun 18, 2025
- 3 minute read
This module contains a DataIndexApi
class to perform API operations.
The HERE API reference documentation used in this module can be found here: Index API Reference # noqa E501
- class here.platform.api.data_index_api.DataIndexApi(base_url: str, platform_config: PlatformConfig, application_config: ApplicationConfig, auth: Auth | None, proxies: dict | None = None)[source]#
Bases:
BaseApi
This class provides access to HERE platform Data Index APIs.
Use the index service to get the data handles of the partitions that match a query. Then, use the data handles with the blob service to get the data from the partitions. You can also use the index service to publish data to an index layer.
- get_delete_request_status(layer_id: str, delete_id: str, billing_tag: str | None = None) dict [source]#
Return the details of the specified delete request. Delete request can be in one of the following states: Scheduled, Processing, Failed, Succeeded.
- Parameters:
layer_id – The ID of the index layer you want to get the delete request status for.
delete_id – Id of the delete request returned from the index delete operation.
billing_tag – A string which is used for grouping billing records.
- Returns:
response from the API.
- Raises:
PlatformException – If platform responds with an HTTP error.
- get_parts(layer_id: str, num_requested_parts: int, billing_tag: str | None = None) dict [source]#
Return a list of Part Ids which represent the layer parts that can be used to limit the scope of a query operation. This allows to run parallel queries with multiple parts. The user has to provide the desired number of parts and the service will return a list of Part Ids. Please note in some cases the requested number of parts will make them too small and in this case the service might return lesser amount of the parts than requested.
- Parameters:
layer_id – The ID of the index layer you want to query.
num_requested_parts – Indicates requested number of layer parts.
billing_tag – A string which is used for grouping billing records.
- Returns:
response from the API.
- Raises:
PlatformException – If platform responds with an HTTP error.
- insert_indexes(layer_id: str, body: list, billing_tag: str | None = None)[source]#
Add index data for a given data blob to an index layer.
- Parameters:
body – An array of index attributes and values to be inserted.
layer_id – The layer ID of the index layer.
billing_tag – A string which is used for grouping billing records.
- Raises:
PlatformException – If platform responds with an HTTP error.
- perform_delete(layer_id: str, delete_query: str, billing_tag: str | None = None) dict [source]#
Cancel a publication if it has not yet been submitted.
- Parameters:
layer_id – The ID of the index layer you want to delete from.
delete_query – An RSQL query to use to delete the partitions that match the query. The query must use the indexing attributes defined in the index layer.
billing_tag – A string which is used for grouping billing records.
- Returns:
response from the API.
- Raises:
PlatformException – If platform responds with an HTTP error.
- perform_query(layer_id: str, query: str, part: str | None = None, billing_tag: str | None = None) dict [source]#
Query the index layer for the partitions that match the query. Returns each partition that matches the query, including each partition’s data handle, which you use with the blob API to retrieve data for each partition.
- Parameters:
layer_id – The ID of the index layer you want to query.
query – An RSQL query to use to retrieve partitions that match the query. For more information, see Get Index Data from an Index Layer. The query must use the indexing attributes defined in the index layer.
part – Indicates which part of the layer shall be queried.
billing_tag – A string which is used for grouping billing records.
- Returns:
response from the API.
- Raises:
PlatformException – If platform responds with an HTTP error.
- perform_update(layer_id: str, body: dict, billing_tag: str | None = None)[source]#
Modify partitions in an index layer.
- Parameters:
layer_id – The layer ID of the index layer.
body – Contains the data you want to add or remove from the index layer
billing_tag – A string which is used for grouping billing records.
- Raises:
PlatformException – If platform responds with an HTTP error.