# here-data-metadata-v1-client
The `metadata` service provides a way to get information (metadata) about layers and partitions stored in a catalog. This service exposes the metadata for all the partitions or all the changed partitions. For a catalog with versioned layers, you can retrieve metadata for a particular version or version range of the catalog. You can perform the following operations for a catalog with versioned layers:
- List versions of the catalog
- Get latest and minimum version of the catalog
- Get metadata of the specific layers

For a volatile layer, you can get metadata for all or a subset of partitions of the layer.

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

- API version: 1.0.3
- Package version: 1.2.111
- 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_metadata_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_metadata_v1_client
```

## Getting Started

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

```python

import time
import here_data_metadata_v1_client
from pprint import pprint
from here_data_metadata_v1_client.api import metadata_api
from here_data_metadata_v1_client.model.additional_fields_enum import AdditionalFieldsEnum
from here_data_metadata_v1_client.model.dependencies import Dependencies
from here_data_metadata_v1_client.model.layer_versions import LayerVersions
from here_data_metadata_v1_client.model.minimum_version_info import MinimumVersionInfo
from here_data_metadata_v1_client.model.partitions import Partitions
from here_data_metadata_v1_client.model.parts_response import PartsResponse
from here_data_metadata_v1_client.model.version_infos import VersionInfos
from here_data_metadata_v1_client.model.version_response import VersionResponse
from here_data_metadata_v1_client.model.versions_response import VersionsResponse
# 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_metadata_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_metadata_v1_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)


# Enter a context with an instance of the API client
with here_data_metadata_v1_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = metadata_api.MetadataApi(api_client)
    dependencies = Dependencies(
        dependencies=[
            CatalogVersion(
                hrn="hrn:here:data:::my-catalog",
                version=24,
            ),
        ],
    ) # Dependencies | The catalog dependencies we want to search for
limit = 1 # int | The numbers of items to return per page (optional) (default to 1)

    try:
        # Gets a list of available catalog versions that respect the given dependencies
        api_response = api_instance.compatible_versions(dependencies, limit=limit)
        pprint(api_response)
    except here_data_metadata_v1_client.ApiException as e:
        print("Exception when calling MetadataApi->compatible_versions: %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
------------ | ------------- | ------------- | -------------
*MetadataApi* | [**compatible_versions**](docs/MetadataApi.md#compatible_versions) | **POST** /versions/compatibles | Gets a list of available catalog versions that respect the given dependencies
*MetadataApi* | [**get_changes**](docs/MetadataApi.md#get_changes) | **GET** /layers/{layerId}/changes | Gets changes for the version range.
*MetadataApi* | [**get_changes_parts**](docs/MetadataApi.md#get_changes_parts) | **GET** /layers/{layerId}/changes/parts | Get partIds for parallel queries of changes for the version range.
*MetadataApi* | [**get_layers_version**](docs/MetadataApi.md#get_layers_version) | **GET** /layerVersions | Gets layer versions for catalog version
*MetadataApi* | [**get_partitions**](docs/MetadataApi.md#get_partitions) | **GET** /layers/{layerId}/partitions | Gets partitions
*MetadataApi* | [**get_partitions_parts**](docs/MetadataApi.md#get_partitions_parts) | **GET** /layers/{layerId}/partitions/parts | Get partIds for parallel queries of the metadata for all partitions in a specific layer.
*MetadataApi* | [**latest_version**](docs/MetadataApi.md#latest_version) | **GET** /versions/latest | Gets the latest available catalog version
*MetadataApi* | [**list_versions**](docs/MetadataApi.md#list_versions) | **GET** /versions | Gets catalog versions
*MetadataApi* | [**minimum_version**](docs/MetadataApi.md#minimum_version) | **GET** /versions/minimum | Gets the earliest available catalog version
*MetadataApi* | [**set_minimum_version**](docs/MetadataApi.md#set_minimum_version) | **POST** /versions/minimum | Sets the earliest available catalog version


## Documentation For Models

 - [AdditionalFieldsEnum](docs/AdditionalFieldsEnum.md)
 - [CatalogVersion](docs/CatalogVersion.md)
 - [Dependencies](docs/Dependencies.md)
 - [LayerVersion](docs/LayerVersion.md)
 - [LayerVersions](docs/LayerVersions.md)
 - [MinimumVersionInfo](docs/MinimumVersionInfo.md)
 - [PartId](docs/PartId.md)
 - [Partition](docs/Partition.md)
 - [Partitions](docs/Partitions.md)
 - [PartsResponse](docs/PartsResponse.md)
 - [VersionDependency](docs/VersionDependency.md)
 - [VersionInfo](docs/VersionInfo.md)
 - [VersionInfos](docs/VersionInfos.md)
 - [VersionResponse](docs/VersionResponse.md)
 - [VersionsResponse](docs/VersionsResponse.md)
 - [VersionsResponseVersions](docs/VersionsResponseVersions.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_metadata_v1_client.apis and here_data_metadata_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_metadata_v1_client.api.default_api import DefaultApi`
- `from here_data_metadata_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_metadata_v1_client
from here_data_metadata_v1_client.apis import *
from here_data_metadata_v1_client.models import *
```

