# em-toolhub
REST API for customer access to ToolHub well data.

## Authentication

All endpoints require Bearer token authentication using an API key:

```
Authorization: Bearer thub_live_xxxxxxxxxxxxxxxxxxxx
```

API keys are issued per-organization and inherit well access permissions.

## Rate Limits

- Standard tier: 70 requests/minute
- Premium tier: 300 requests/minute

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

- API version: 0.1.0
- Package version: 0.1.0
- Generator version: 7.19.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://erdosmiller.com](https://erdosmiller.com)

## Requirements.

Python 3.9+

## 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 em_toolhub
```

### 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 em_toolhub
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import em_toolhub
from em_toolhub.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = em_toolhub.Configuration(
    host = "http://localhost"
)

# 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 (API Key): bearerAuth
configuration = em_toolhub.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with em_toolhub.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = em_toolhub.FilesApi(api_client)
    well_id = 'well_id_example' # str | 
    file_id = 'file_id_example' # str | 

    try:
        # Delete a file
        api_response = api_instance.delete_file(well_id, file_id)
        print("The response of FilesApi->delete_file:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling FilesApi->delete_file: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FilesApi* | [**delete_file**](docs/FilesApi.md#delete_file) | **DELETE** /api/v1/wells/{wellId}/files/{fileId} | Delete a file
*FilesApi* | [**download_file**](docs/FilesApi.md#download_file) | **GET** /api/v1/wells/{wellId}/files/{fileId}/download | Download a file
*FilesApi* | [**get_file**](docs/FilesApi.md#get_file) | **GET** /api/v1/wells/{wellId}/files/{fileId} | Get file metadata
*FilesApi* | [**list_files**](docs/FilesApi.md#list_files) | **GET** /api/v1/wells/{wellId}/files | List files
*SurveysApi* | [**get_survey**](docs/SurveysApi.md#get_survey) | **GET** /api/v1/wells/{wellId}/surveys/{surveyId} | Get survey details
*SurveysApi* | [**list_surveys**](docs/SurveysApi.md#list_surveys) | **GET** /api/v1/wells/{wellId}/surveys | List surveys for a well
*WellsApi* | [**get_well**](docs/WellsApi.md#get_well) | **GET** /api/v1/wells/{wellId} | Get well details
*WellsApi* | [**list_wells**](docs/WellsApi.md#list_wells) | **GET** /api/v1/wells | List wells


## Documentation For Models

 - [DeleteFile401ResponseBody](docs/DeleteFile401ResponseBody.md)
 - [DeleteFile401ResponseBodyError](docs/DeleteFile401ResponseBodyError.md)
 - [DeleteFile401ResponseBodyMeta](docs/DeleteFile401ResponseBodyMeta.md)
 - [DeleteFile404ResponseBody](docs/DeleteFile404ResponseBody.md)
 - [DeleteFile500ResponseBody](docs/DeleteFile500ResponseBody.md)
 - [DownloadFile401ResponseBody](docs/DownloadFile401ResponseBody.md)
 - [DownloadFile404ResponseBody](docs/DownloadFile404ResponseBody.md)
 - [DownloadFile500ResponseBody](docs/DownloadFile500ResponseBody.md)
 - [ErrorMessage](docs/ErrorMessage.md)
 - [GetFile200ResponseBody](docs/GetFile200ResponseBody.md)
 - [GetFile200ResponseBodyData](docs/GetFile200ResponseBodyData.md)
 - [GetFile401ResponseBody](docs/GetFile401ResponseBody.md)
 - [GetFile404ResponseBody](docs/GetFile404ResponseBody.md)
 - [GetFile500ResponseBody](docs/GetFile500ResponseBody.md)
 - [GetSurvey200ResponseBody](docs/GetSurvey200ResponseBody.md)
 - [GetSurvey200ResponseBodyData](docs/GetSurvey200ResponseBodyData.md)
 - [GetSurvey200ResponseBodyDataCorrectionsInner](docs/GetSurvey200ResponseBodyDataCorrectionsInner.md)
 - [GetSurvey200ResponseBodyDataRaw](docs/GetSurvey200ResponseBodyDataRaw.md)
 - [GetSurvey401ResponseBody](docs/GetSurvey401ResponseBody.md)
 - [GetSurvey404ResponseBody](docs/GetSurvey404ResponseBody.md)
 - [GetSurvey500ResponseBody](docs/GetSurvey500ResponseBody.md)
 - [GetWell200ResponseBody](docs/GetWell200ResponseBody.md)
 - [GetWell200ResponseBodyData](docs/GetWell200ResponseBodyData.md)
 - [GetWell200ResponseBodyDataWellboresInner](docs/GetWell200ResponseBodyDataWellboresInner.md)
 - [GetWell401ResponseBody](docs/GetWell401ResponseBody.md)
 - [GetWell404ResponseBody](docs/GetWell404ResponseBody.md)
 - [GetWell500ResponseBody](docs/GetWell500ResponseBody.md)
 - [ListFiles200ResponseBody](docs/ListFiles200ResponseBody.md)
 - [ListFiles200ResponseBodyData](docs/ListFiles200ResponseBodyData.md)
 - [ListFiles200ResponseBodyDataFilesInner](docs/ListFiles200ResponseBodyDataFilesInner.md)
 - [ListFiles401ResponseBody](docs/ListFiles401ResponseBody.md)
 - [ListFiles404ResponseBody](docs/ListFiles404ResponseBody.md)
 - [ListFiles500ResponseBody](docs/ListFiles500ResponseBody.md)
 - [ListSurveys200ResponseBody](docs/ListSurveys200ResponseBody.md)
 - [ListSurveys200ResponseBodyData](docs/ListSurveys200ResponseBodyData.md)
 - [ListSurveys200ResponseBodyDataSurveysInner](docs/ListSurveys200ResponseBodyDataSurveysInner.md)
 - [ListSurveys401ResponseBody](docs/ListSurveys401ResponseBody.md)
 - [ListSurveys404ResponseBody](docs/ListSurveys404ResponseBody.md)
 - [ListSurveys500ResponseBody](docs/ListSurveys500ResponseBody.md)
 - [ListWells200ResponseBody](docs/ListWells200ResponseBody.md)
 - [ListWells200ResponseBodyData](docs/ListWells200ResponseBodyData.md)
 - [ListWells200ResponseBodyDataWellsInner](docs/ListWells200ResponseBodyDataWellsInner.md)
 - [ListWells401ResponseBody](docs/ListWells401ResponseBody.md)
 - [ListWells500ResponseBody](docs/ListWells500ResponseBody.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="bearerAuth"></a>
### bearerAuth

- **Type**: Bearer authentication (API Key)


## Author




