# corva_assets
The Corva API is a powerful interface providing great flexibility and extensibility with Corva. Whether your needs are simple UI visualizations, data entry, replication/sync tasks, real-time stream processing, or complex machine learning CPU-intensive apps, the Corva API is the way to make it happen. Our concepts are split into three distinct silos: data apps, visualization apps, and a REST API

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

- API version: v2.146.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.7+

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

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

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import time
import corva_assets
from corva_assets.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 = corva_assets.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 API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'


# Enter a context with an instance of the API client
with corva_assets.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corva_assets.AssetsApi(api_client)
    types = 'types_example' # str | List of asset types (optional)
    status = 'status_example' # str | Search by asset status (optional)
    visibility = 'visibility_example' # str | Search by asset visibility (optional)
    ids = [3.4] # List[float] | List of asset IDs to filter by (optional)
    program = 3.4 # float | Search by Program ID (optional)
    parent_asset_id = 3.4 # float | Search by parent asset ID (optional)
    api_number = 'api_number_example' # str | Search by API number or other well identifier (optional)
    search = 'search_example' # str | Search by asset ID, asset name, api_number or customer_well_id (optional)
    start = 3.4 # float | Search by start time as a Unix timestamp (optional)
    end = 3.4 # float | Search by end time as a Unix timestamp (optional)
    long_start = 3.4 # float | Search by lon_lat coordinate area (optional)
    long_end = 3.4 # float | Search by lon_lat coordinate area (optional)
    lat_start = 3.4 # float | Search by lon_lat coordinate area (optional)
    lat_end = 3.4 # float | Search by lon_lat coordinate area (optional)
    company_id = 3.4 # float | Search by Company ID (optional)
    fields = ['fields_example'] # List[str] | Respond with only the given list of fields, like asset.asset_type. See example response for fields. (optional)
    per_page = 3.4 # float | Number of items to list per page (optional)
    sort = 'sort_example' # str | One or more fields to sort by. Prefix with a - for descending order. Ex: name,-last_active_at (optional)
    order = 'asc' # str | A sorting direction (optional) (default to 'asc')

    try:
        # List assets
        api_response = api_instance.v2_assets_get(types=types, status=status, visibility=visibility, ids=ids, program=program, parent_asset_id=parent_asset_id, api_number=api_number, search=search, start=start, end=end, long_start=long_start, long_end=long_end, lat_start=lat_start, lat_end=lat_end, company_id=company_id, fields=fields, per_page=per_page, sort=sort, order=order)
        print("The response of AssetsApi->v2_assets_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AssetsApi->v2_assets_get: %s\n" % e)

```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AssetsApi* | [**v2_assets_get**](docs/AssetsApi.md#v2_assets_get) | **GET** /v2/assets | List assets
*AssetsApi* | [**v2_assets_id_get**](docs/AssetsApi.md#v2_assets_id_get) | **GET** /v2/assets/{id} | Get asset by ID


## Documentation For Models

 - [Asset](docs/Asset.md)
 - [AssetAttributes](docs/AssetAttributes.md)
 - [AssetAttributesSourceWell](docs/AssetAttributesSourceWell.md)
 - [AuthenticationError](docs/AuthenticationError.md)
 - [AuthorizationError](docs/AuthorizationError.md)
 - [NotFoundError](docs/NotFoundError.md)


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


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

- **Type**: API key
- **API key parameter name**: authorization
- **Location**: HTTP header


## Author

support@corva.ai


