# here-data-ingest-v1-client
The `ingestion` service provides the way to submit data to stream layers using REST API.

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

- API version: 1.1.1
- Package version: 1.2.64
- 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_ingest_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_ingest_v1_client
```

## Getting Started

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

```python

import time
import here_data_ingest_v1_client
from pprint import pprint
from here_data_ingest_v1_client.api import ingestion_api
from here_data_ingest_v1_client.model.response400 import Response400
from here_data_ingest_v1_client.model.response404 import Response404
from here_data_ingest_v1_client.model.response413 import Response413
from here_data_ingest_v1_client.model.response415 import Response415
from here_data_ingest_v1_client.model.response500 import Response500
from here_data_ingest_v1_client.model.response_ok import ResponseOk
from here_data_ingest_v1_client.model.response_ok_single import ResponseOkSingle
# Defining the host is optional and defaults to https://use.apilookup.for.a.base.url
# See configuration.py for a list of all supported configuration parameters.
configuration = here_data_ingest_v1_client.Configuration(
    host = "https://use.apilookup.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_ingest_v1_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)


# Enter a context with an instance of the API client
with here_data_ingest_v1_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ingestion_api.IngestionApi(api_client)
    layer_id = "layerId_example" # str | The ID of the layer where you want the data ingested.
byte_array = open('/path/to/file', 'rb') # file_type | A byte array of data to send to the Open Location Platform for ingestion. The maximum size is 20 MB. Decode the example from base64 before using.
x_here_checksum = "X-HERE-Checksum_example" # str | A base64 encoded SHA-256 hash you can provide for validation against the calculated value on the request body hash. This verifies the integrity of your request and prevents modification by a third party.It will be created by the service if not provided. A SHA-256 hash consists of 256 bits or 64 chars. (optional)
x_here_trace_id = "X-HERE-TraceId_example" # str | A unique message ID, such as a UUID. This can be included in the request if you want to use an ID that you define. If you do not include an ID, one will be generated during ingestion and included in the response. You can use this ID to track your request and identify the message in the catalog. (optional)
x_here_message_key = "X-HERE-Message-Key_example" # str | A unique message ID, such as a UUID. This can be included in the request if you want to use an ID that you define. If you do not include an ID, X-HERE-TraceId will be used instead. You can use this ID to specify the partition for the message in the data catalog. (optional)
billing_tag = "billingTag_example" # str | Optional billing tag provided by customer. It will be used in grouping of billing records. (optional)

    try:
        # Endpoint for ingesting generic data
        api_response = api_instance.ingest_data(layer_id, byte_array, x_here_checksum=x_here_checksum, x_here_trace_id=x_here_trace_id, x_here_message_key=x_here_message_key, billing_tag=billing_tag)
        pprint(api_response)
    except here_data_ingest_v1_client.ApiException as e:
        print("Exception when calling IngestionApi->ingest_data: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://use.apilookup.for.a.base.url*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*IngestionApi* | [**ingest_data**](docs/IngestionApi.md#ingest_data) | **POST** /layers/{layerId} | Endpoint for ingesting generic data
*IngestionApi* | [**ingest_sdii**](docs/IngestionApi.md#ingest_sdii) | **POST** /layers/{layerId}/sdiiMessageList | Send a list of SDII messages to a stream layer


## Documentation For Models

 - [Response400](docs/Response400.md)
 - [Response404](docs/Response404.md)
 - [Response413](docs/Response413.md)
 - [Response415](docs/Response415.md)
 - [Response500](docs/Response500.md)
 - [ResponseOk](docs/ResponseOk.md)
 - [ResponseOkSingle](docs/ResponseOkSingle.md)
 - [ResponseOkTraceID](docs/ResponseOkTraceID.md)
 - [ResponseOkTraceId](docs/ResponseOkTraceId.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_ingest_v1_client.apis and here_data_ingest_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_ingest_v1_client.api.default_api import DefaultApi`
- `from here_data_ingest_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_ingest_v1_client
from here_data_ingest_v1_client.apis import *
from here_data_ingest_v1_client.models import *
```

