Metadata-Version: 2.4
Name: ObservabilityAPI
Version: 1.0.6
Summary: ObservabilityAPI
Home-page: 
Author: Max Smith
Author-email: Max Smith <max.smith@3adesign.co.uk>
Keywords: OpenAPI,OpenAPI-Generator,ObservabilityAPI
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: connexion>=2.0.2
Requires-Dist: swagger-ui-bundle>=0.0.2
Requires-Dist: python_dateutil>=2.6.0
Requires-Dist: setuptools>=21.0.0
Requires-Dist: requests
Requires-Dist: pydantic
Requires-Dist: opentelemetry.sdk
Requires-Dist: opentelemetry.api
Requires-Dist: opentelemetry-instrumentation
Requires-Dist: opentelemetry.instrumentation.urllib3
Dynamic: author
Dynamic: license-file

# ObservabilityAPI
Observability API

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

- API version: 1.0.2
- Package version: 1.0.2
- Generator version: 7.11.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.8+

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

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

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import ObservabilityAPI
from ObservabilityAPI.rest import ApiException
from pprint import pprint

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



# Enter a context with an instance of the API client
with ObservabilityAPI.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ObservabilityAPI.GrafanaApi(api_client)
    datasource_name = 'datasource_name_example' # str | Name for the datasource
    datasource_type = prometheus # str | Type of datasource to create (default to prometheus)
    datasource_url = 'datasource_url_example' # str | URL of the datasource endpoint
    service_key = 'service_key_example' # str | Grafana service account key for authentication
    database_name = 'database_name_example' # str | Database name (for database datasources) (optional)
    username = 'username_example' # str | Username for datasource authentication (optional)
    password = 'password_example' # str | Password for datasource authentication (optional)
    is_default = False # bool | Set this datasource as default (optional) (default to False)
    basic_auth = False # bool | Enable basic authentication (optional) (default to False)

    try:
        # Add Datasource to Grafana
        api_response = api_instance.add_grafana_datasource(datasource_name, datasource_type, datasource_url, service_key, database_name=database_name, username=username, password=password, is_default=is_default, basic_auth=basic_auth)
        print("The response of GrafanaApi->add_grafana_datasource:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling GrafanaApi->add_grafana_datasource: %s\n" % e)

```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*GrafanaApi* | [**add_grafana_datasource**](docs/GrafanaApi.md#add_grafana_datasource) | **POST** /grafana/datasource | Add Datasource to Grafana
*GrafanaApi* | [**deploy_grafana_dashboards**](docs/GrafanaApi.md#deploy_grafana_dashboards) | **GET** /grafana | Deploy Grafana Dashboards
*GrafanaApi* | [**generate_grafana_service_key**](docs/GrafanaApi.md#generate_grafana_service_key) | **GET** /grafana/auth | Generate Grafana Service Account Key
*PrometheusApi* | [**add_exporter_to_host**](docs/PrometheusApi.md#add_exporter_to_host) | **PUT** /prometheus | Add/Update Specific Exporter for Host
*PrometheusApi* | [**add_prometheus_target**](docs/PrometheusApi.md#add_prometheus_target) | **POST** /prometheus | Add Prometheus Monitoring Target
*PrometheusApi* | [**get_prometheus_targets**](docs/PrometheusApi.md#get_prometheus_targets) | **GET** /prometheus | Get Prometheus Targets Configuration
*PrometheusApi* | [**remove_prometheus_target**](docs/PrometheusApi.md#remove_prometheus_target) | **DELETE** /prometheus | Remove Prometheus Monitoring Target


## Documentation For Models

 - [AddExporterToHost200Response](docs/AddExporterToHost200Response.md)
 - [AddExporterToHost200ResponseExporter](docs/AddExporterToHost200ResponseExporter.md)
 - [AddGrafanaDatasource200Response](docs/AddGrafanaDatasource200Response.md)
 - [AddPrometheusTarget200Response](docs/AddPrometheusTarget200Response.md)
 - [DbPhrameJSONStore](docs/DbPhrameJSONStore.md)
 - [DeployGrafanaDashboards200Response](docs/DeployGrafanaDashboards200Response.md)
 - [GetPrometheusTargets200Response](docs/GetPrometheusTargets200Response.md)
 - [GetPrometheusTargets200ResponseTargetsInner](docs/GetPrometheusTargets200ResponseTargetsInner.md)
 - [GetPrometheusTargets200ResponseTargetsInnerPorts](docs/GetPrometheusTargets200ResponseTargetsInnerPorts.md)
 - [RemovePrometheusTarget200Response](docs/RemovePrometheusTarget200Response.md)


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

Endpoints do not require authorization.


## Author

max.smith@3adesign.co.uk


