# here-data-index-v1-client
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. For more information, see [Get Data from an Index Layer](https://developer.here.com/olp/documentation/data-store/data_dev_guide/rest/getting-data-index.html). You can also use the `index` service to publish data to an index layer. For more information, see [Publish to an Index Layer](https://developer.here.com/olp/documentation/data-store/data_dev_guide/rest/publishing-data-index.html).

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.1.1
- Package version: 1.2.94
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python >= 3.6

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import here_data_index_v1_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import here_data_index_v1_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
import here_data_index_v1_client
from pprint import pprint
from here_data_index_v1_client.api import index_api
from here_data_index_v1_client.model.data_response import DataResponse
from here_data_index_v1_client.model.delete_request_status import DeleteRequestStatus
from here_data_index_v1_client.model.delete_response import DeleteResponse
from here_data_index_v1_client.model.index import Index
from here_data_index_v1_client.model.parts_response import PartsResponse
from here_data_index_v1_client.model.update_index_request import UpdateIndexRequest
# Defining the host is optional and defaults to http://Use API Lookup for a base URL
# See configuration.py for a list of all supported configuration parameters.
configuration = here_data_index_v1_client.Configuration(
    host = "http://Use API Lookup for a base URL"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = here_data_index_v1_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)


# Enter a context with an instance of the API client
with here_data_index_v1_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = index_api.IndexApi(api_client)
    layer_id = "index" # str | The ID of the index layer you want to get the delete request status for.
delete_id = "e07191de-8ab8-49f5-a11d-8240e1b93ab7" # str | Id of the delete request returned from the index delete operation.
billing_tag = "billingTag_example" # str | Billing Tag is an optional free-form tag which is used for grouping billing records together. If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. Grouping billing records by billing tag will be available in future releases. (optional)

    try:
        # Returns the status of the delete request
        api_response = api_instance.get_delete_request_status(layer_id, delete_id, billing_tag=billing_tag)
        pprint(api_response)
    except here_data_index_v1_client.ApiException as e:
        print("Exception when calling IndexApi->get_delete_request_status: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *http://Use API Lookup for a base URL*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*IndexApi* | [**get_delete_request_status**](docs/IndexApi.md#get_delete_request_status) | **GET** /layers/{layerID}/deleteRequest/{deleteId} | Returns the status of the delete request
*IndexApi* | [**get_parts**](docs/IndexApi.md#get_parts) | **GET** /layers/{layerID}/parts | Get partIds for parallel queries.
*IndexApi* | [**insert_indexes**](docs/IndexApi.md#insert_indexes) | **POST** /layers/{layerID} | Inserts index data to an index layer
*IndexApi* | [**perform_delete**](docs/IndexApi.md#perform_delete) | **DELETE** /layers/{layerID} | Deletes the partitions that match the query
*IndexApi* | [**perform_query**](docs/IndexApi.md#perform_query) | **GET** /layers/{layerID} | Gets the partitions that match the query
*IndexApi* | [**perform_update**](docs/IndexApi.md#perform_update) | **PUT** /layers/{layerID} | Updates index layer partitions


## Documentation For Models

 - [DataResponse](docs/DataResponse.md)
 - [DeleteRequestStatus](docs/DeleteRequestStatus.md)
 - [DeleteResponse](docs/DeleteResponse.md)
 - [Index](docs/Index.md)
 - [MapStringObject](docs/MapStringObject.md)
 - [PartId](docs/PartId.md)
 - [PartsResponse](docs/PartsResponse.md)
 - [UpdateIndexRequest](docs/UpdateIndexRequest.md)


## Documentation For Authorization


## Bearer

- **Type**: Bearer authentication (JWT)


## Author




## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in here_data_index_v1_client.apis and here_data_index_v1_client.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from here_data_index_v1_client.api.default_api import DefaultApi`
- `from here_data_index_v1_client.model.pet import Pet`

Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import here_data_index_v1_client
from here_data_index_v1_client.apis import *
from here_data_index_v1_client.models import *
```

