# 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
Raw data
{
"_id": null,
"home_page": null,
"name": "ObservabilityAPI",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.4",
"maintainer_email": null,
"keywords": "OpenAPI, OpenAPI-Generator, ObservabilityAPI",
"author": "Max Smith",
"author_email": "Max Smith <max.smith@3adesign.co.uk>",
"download_url": "https://files.pythonhosted.org/packages/ef/88/70d163b7a29d8e5af9e1920f0859eaeeff702ad45a60443ad5f897a37ef4/observabilityapi-1.0.6.tar.gz",
"platform": null,
"description": "# ObservabilityAPI\nObservability API\n\nThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: 1.0.2\n- Package version: 1.0.2\n- Generator version: 7.11.0\n- Build package: org.openapitools.codegen.languages.PythonClientCodegen\n\n## Requirements.\n\nPython 3.8+\n\n## Installation & Usage\n### pip install\n\nIf the python package is hosted on a repository, you can install directly using:\n\n```sh\npip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git\n```\n(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)\n\nThen import the package:\n```python\nimport ObservabilityAPI\n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport ObservabilityAPI\n```\n\n### Tests\n\nExecute `pytest` to run the tests.\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\n\nimport ObservabilityAPI\nfrom ObservabilityAPI.rest import ApiException\nfrom pprint import pprint\n\n# Defining the host is optional and defaults to http://localhost/PhrameObservability\n# See configuration.py for a list of all supported configuration parameters.\nconfiguration = ObservabilityAPI.Configuration(\n host = \"http://localhost/PhrameObservability\"\n)\n\n\n\n# Enter a context with an instance of the API client\nwith ObservabilityAPI.ApiClient(configuration) as api_client:\n # Create an instance of the API class\n api_instance = ObservabilityAPI.GrafanaApi(api_client)\n datasource_name = 'datasource_name_example' # str | Name for the datasource\n datasource_type = prometheus # str | Type of datasource to create (default to prometheus)\n datasource_url = 'datasource_url_example' # str | URL of the datasource endpoint\n service_key = 'service_key_example' # str | Grafana service account key for authentication\n database_name = 'database_name_example' # str | Database name (for database datasources) (optional)\n username = 'username_example' # str | Username for datasource authentication (optional)\n password = 'password_example' # str | Password for datasource authentication (optional)\n is_default = False # bool | Set this datasource as default (optional) (default to False)\n basic_auth = False # bool | Enable basic authentication (optional) (default to False)\n\n try:\n # Add Datasource to Grafana\n 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)\n print(\"The response of GrafanaApi->add_grafana_datasource:\\n\")\n pprint(api_response)\n except ApiException as e:\n print(\"Exception when calling GrafanaApi->add_grafana_datasource: %s\\n\" % e)\n\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *http://localhost/PhrameObservability*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*GrafanaApi* | [**add_grafana_datasource**](docs/GrafanaApi.md#add_grafana_datasource) | **POST** /grafana/datasource | Add Datasource to Grafana\n*GrafanaApi* | [**deploy_grafana_dashboards**](docs/GrafanaApi.md#deploy_grafana_dashboards) | **GET** /grafana | Deploy Grafana Dashboards\n*GrafanaApi* | [**generate_grafana_service_key**](docs/GrafanaApi.md#generate_grafana_service_key) | **GET** /grafana/auth | Generate Grafana Service Account Key\n*PrometheusApi* | [**add_exporter_to_host**](docs/PrometheusApi.md#add_exporter_to_host) | **PUT** /prometheus | Add/Update Specific Exporter for Host\n*PrometheusApi* | [**add_prometheus_target**](docs/PrometheusApi.md#add_prometheus_target) | **POST** /prometheus | Add Prometheus Monitoring Target\n*PrometheusApi* | [**get_prometheus_targets**](docs/PrometheusApi.md#get_prometheus_targets) | **GET** /prometheus | Get Prometheus Targets Configuration\n*PrometheusApi* | [**remove_prometheus_target**](docs/PrometheusApi.md#remove_prometheus_target) | **DELETE** /prometheus | Remove Prometheus Monitoring Target\n\n\n## Documentation For Models\n\n - [AddExporterToHost200Response](docs/AddExporterToHost200Response.md)\n - [AddExporterToHost200ResponseExporter](docs/AddExporterToHost200ResponseExporter.md)\n - [AddGrafanaDatasource200Response](docs/AddGrafanaDatasource200Response.md)\n - [AddPrometheusTarget200Response](docs/AddPrometheusTarget200Response.md)\n - [DbPhrameJSONStore](docs/DbPhrameJSONStore.md)\n - [DeployGrafanaDashboards200Response](docs/DeployGrafanaDashboards200Response.md)\n - [GetPrometheusTargets200Response](docs/GetPrometheusTargets200Response.md)\n - [GetPrometheusTargets200ResponseTargetsInner](docs/GetPrometheusTargets200ResponseTargetsInner.md)\n - [GetPrometheusTargets200ResponseTargetsInnerPorts](docs/GetPrometheusTargets200ResponseTargetsInnerPorts.md)\n - [RemovePrometheusTarget200Response](docs/RemovePrometheusTarget200Response.md)\n\n\n<a id=\"documentation-for-authorization\"></a>\n## Documentation For Authorization\n\nEndpoints do not require authorization.\n\n\n## Author\n\nmax.smith@3adesign.co.uk\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "ObservabilityAPI",
"version": "1.0.6",
"project_urls": null,
"split_keywords": [
"openapi",
" openapi-generator",
" observabilityapi"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6d1ef321611981005478ff73900162e03bd574d6342bf585eb7cac85082a5935",
"md5": "d65c4c11dd603e6ba827e8afdef2f457",
"sha256": "0f7fb0437386d9d69d7f607e9d1c4d43db5fad94769025736228dae023dcfe30"
},
"downloads": -1,
"filename": "observabilityapi-1.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d65c4c11dd603e6ba827e8afdef2f457",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.4",
"size": 43978,
"upload_time": "2025-08-14T12:44:11",
"upload_time_iso_8601": "2025-08-14T12:44:11.448570Z",
"url": "https://files.pythonhosted.org/packages/6d/1e/f321611981005478ff73900162e03bd574d6342bf585eb7cac85082a5935/observabilityapi-1.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ef8870d163b7a29d8e5af9e1920f0859eaeeff702ad45a60443ad5f897a37ef4",
"md5": "23a1c313ac17837a251fd4d890e61001",
"sha256": "f439cef3d7fdeffdcf1d4f43d62c999c8ddefde553a9ade68c1069509875cf28"
},
"downloads": -1,
"filename": "observabilityapi-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "23a1c313ac17837a251fd4d890e61001",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.4",
"size": 34612,
"upload_time": "2025-08-14T12:44:12",
"upload_time_iso_8601": "2025-08-14T12:44:12.739812Z",
"url": "https://files.pythonhosted.org/packages/ef/88/70d163b7a29d8e5af9e1920f0859eaeeff702ad45a60443ad5f897a37ef4/observabilityapi-1.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-14 12:44:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "observabilityapi"
}