torizon-io-api 0.0.7
Torizon OTA
Requires Python: >=3.9
Keywords: OpenAPI, OpenAPI-Generator, Torizon OTA

# torizon-io-api

This API is rate limited and will return the following headers for each API call.

  - X-RateLimit-Limit - The total number of requests allowed within a time period
  - X-RateLimit-Remaining - The total number of requests still allowed until the end of the rate limiting period
  - X-RateLimit-Reset - The number of seconds until the limit is fully reset

In addition, if an API client is rate limited, it will receive a HTTP 420 response with the following header:

   - Retry-After - The number of seconds to wait until this request is allowed



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

- API version: 2.0-Beta
- Package version: 0.0.7
- Generator version: 7.20.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

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

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

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import torizon_io_api
from torizon_io_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.torizon.io/api/v2beta
# See configuration.py for a list of all supported configuration parameters.
configuration = torizon_io_api.Configuration(
    host = "https://app.torizon.io/api/v2beta"
)

# 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: BearerAuth
configuration = torizon_io_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with torizon_io_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = torizon_io_api.DeviceMetricsApi(api_client)
    device_uuid = 'device_uuid_example' # str | 
    metrics = ['metrics_example'] # List[str] | 
    var_from = 56 # int | 
    to = 56 # int | 
    raw_datapoints = 56 # int |  (optional)
    total_buckets = 56 # int |  (optional)

    try:
        # Get detailed metrics data for a single device
        api_response = api_instance.get_device_data_devices_deviceuuid_detailed_metrics(device_uuid, metrics, var_from, to, raw_datapoints=raw_datapoints, total_buckets=total_buckets)
        print("The response of DeviceMetricsApi->get_device_data_devices_deviceuuid_detailed_metrics:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceMetricsApi->get_device_data_devices_deviceuuid_detailed_metrics: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://app.torizon.io/api/v2beta*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DeviceMetricsApi* | [**get_device_data_devices_deviceuuid_detailed_metrics**](docs/DeviceMetricsApi.md#get_device_data_devices_deviceuuid_detailed_metrics) | **GET** /device-data/devices/{deviceUuid}/detailed-metrics | Get detailed metrics data for a single device
*DeviceMetricsApi* | [**get_device_data_devices_deviceuuid_metrics**](docs/DeviceMetricsApi.md#get_device_data_devices_deviceuuid_metrics) | **GET** /device-data/devices/{deviceUuid}/metrics | Get metrics data from a single device
*DeviceMetricsApi* | [**get_device_data_fleets_fleetid_metrics**](docs/DeviceMetricsApi.md#get_device_data_fleets_fleetid_metrics) | **GET** /device-data/fleets/{fleetId}/metrics | Get aggregated metrics data from a fleet of devices
*DeviceMetricsApi* | [**get_device_data_metric_names**](docs/DeviceMetricsApi.md#get_device_data_metric_names) | **GET** /device-data/metric-names | Get the list of metrics available in your repository
*DeviceMetricsApi* | [**post_device_data_fleets_fleetid_metrics_outliers**](docs/DeviceMetricsApi.md#post_device_data_fleets_fleetid_metrics_outliers) | **POST** /device-data/fleets/{fleetId}/metrics/outliers | Get fleet outlier metrics from a fleet of devices
*DeviceMetricsApi* | [**post_device_data_fleets_fleetid_metrics_report**](docs/DeviceMetricsApi.md#post_device_data_fleets_fleetid_metrics_report) | **POST** /device-data/fleets/{fleetId}/metrics/report | Get metrics report for fleet of devices
*DevicesApi* | [**delete_devices_deviceuuid**](docs/DevicesApi.md#delete_devices_deviceuuid) | **DELETE** /devices/{deviceUuid} | Delete a single device
*DevicesApi* | [**get_devices**](docs/DevicesApi.md#get_devices) | **GET** /devices | Query device information
*DevicesApi* | [**get_devices_deviceuuid**](docs/DevicesApi.md#get_devices_deviceuuid) | **GET** /devices/{deviceUuid} | Get detailed information about a single device
*DevicesApi* | [**get_devices_name_deviceuuid**](docs/DevicesApi.md#get_devices_name_deviceuuid) | **GET** /devices/name/{deviceUuid} | Get the display name of a single device
*DevicesApi* | [**get_devices_network**](docs/DevicesApi.md#get_devices_network) | **GET** /devices/network | Get network information for many devices
*DevicesApi* | [**get_devices_network_deviceuuid**](docs/DevicesApi.md#get_devices_network_deviceuuid) | **GET** /devices/network/{deviceUuid} | Get network information for a single device
*DevicesApi* | [**get_devices_notes_deviceuuid**](docs/DevicesApi.md#get_devices_notes_deviceuuid) | **GET** /devices/notes/{deviceUuid} | Get the device notes for a specific device
*DevicesApi* | [**get_devices_packages**](docs/DevicesApi.md#get_devices_packages) | **GET** /devices/packages | Get information about the installed packages for many devices
*DevicesApi* | [**get_devices_packages_deviceuuid**](docs/DevicesApi.md#get_devices_packages_deviceuuid) | **GET** /devices/packages/{deviceUuid} | Get information about the installed packages for a single device
*DevicesApi* | [**get_devices_token**](docs/DevicesApi.md#get_devices_token) | **GET** /devices/token | Retrieve device provisioning token
*DevicesApi* | [**get_devices_uptane_deviceuuid_assignment**](docs/DevicesApi.md#get_devices_uptane_deviceuuid_assignment) | **GET** /devices/uptane/{deviceUuid}/assignment | Show detailed information about the currently-assigned update for a single device
*DevicesApi* | [**get_devices_uptane_deviceuuid_components**](docs/DevicesApi.md#get_devices_uptane_deviceuuid_components) | **GET** /devices/uptane/{deviceUuid}/components | Get a list of the software components reported by a single device
*DevicesApi* | [**post_devices**](docs/DevicesApi.md#post_devices) | **POST** /devices | Manually create a new device
*DevicesApi* | [**put_devices_hibernation_deviceuuid**](docs/DevicesApi.md#put_devices_hibernation_deviceuuid) | **PUT** /devices/hibernation/{deviceUuid} | Set the hibernation status of a device
*DevicesApi* | [**put_devices_name_deviceuuid**](docs/DevicesApi.md#put_devices_name_deviceuuid) | **PUT** /devices/name/{deviceUuid} | Set the display name of a single device
*DevicesApi* | [**put_devices_notes_deviceuuid**](docs/DevicesApi.md#put_devices_notes_deviceuuid) | **PUT** /devices/notes/{deviceUuid} | Set the device notes for a specific device
*FleetsApi* | [**delete_fleets_fleetid**](docs/FleetsApi.md#delete_fleets_fleetid) | **DELETE** /fleets/{fleetId} | Delete a fleet
*FleetsApi* | [**delete_fleets_fleetid_devices**](docs/FleetsApi.md#delete_fleets_fleetid_devices) | **DELETE** /fleets/{fleetId}/devices | Remove devices from a fleet
*FleetsApi* | [**get_fleets**](docs/FleetsApi.md#get_fleets) | **GET** /fleets | Get information about all fleets in your repository
*FleetsApi* | [**get_fleets_fleetid**](docs/FleetsApi.md#get_fleets_fleetid) | **GET** /fleets/{fleetId} | Get information about a single fleet in your repository
*FleetsApi* | [**get_fleets_fleetid_devices**](docs/FleetsApi.md#get_fleets_fleetid_devices) | **GET** /fleets/{fleetId}/devices | Get information about the devices in a single fleet
*FleetsApi* | [**post_fleets**](docs/FleetsApi.md#post_fleets) | **POST** /fleets | Create a new fleet
*FleetsApi* | [**post_fleets_fleetid_devices**](docs/FleetsApi.md#post_fleets_fleetid_devices) | **POST** /fleets/{fleetId}/devices | Add devices to a fleet
*FleetsApi* | [**put_fleets_fleetid**](docs/FleetsApi.md#put_fleets_fleetid) | **PUT** /fleets/{fleetId} | Update fleet
*PackagesApi* | [**delete_packages_packageid**](docs/PackagesApi.md#delete_packages_packageid) | **DELETE** /packages/{packageId} | Delete a package
*PackagesApi* | [**get_packages**](docs/PackagesApi.md#get_packages) | **GET** /packages | Retrieve metadata about packages in your repository
*PackagesApi* | [**get_packages_external**](docs/PackagesApi.md#get_packages_external) | **GET** /packages_external | Retrieve metadata about packages in your repository from other sources
*PackagesApi* | [**get_packages_external_info**](docs/PackagesApi.md#get_packages_external_info) | **GET** /packages_external/info | Fetch information about external package sources
*PackagesApi* | [**get_packages_external_refresh_source_file_name**](docs/PackagesApi.md#get_packages_external_refresh_source_file_name) | **GET** /packages_external/refresh/{source_file_name} | Refresh metadata from an external package source
*PackagesApi* | [**patch_packages_packageid**](docs/PackagesApi.md#patch_packages_packageid) | **PATCH** /packages/{packageId} | Edit metadata about a package
*PackagesApi* | [**post_packages**](docs/PackagesApi.md#post_packages) | **POST** /packages | Upload a new package
*RemoteAccessApi* | [**delete_remote_access_device_deviceuuid_sessions**](docs/RemoteAccessApi.md#delete_remote_access_device_deviceuuid_sessions) | **DELETE** /remote-access/device/{deviceUuid}/sessions | Delete a remote access session for a device
*RemoteAccessApi* | [**delete_remote_access_user_ip_accept_list_ip_address**](docs/RemoteAccessApi.md#delete_remote_access_user_ip_accept_list_ip_address) | **DELETE** /remote-access/user/ip-accept-list/{ip-address} | Remove accepted ip address
*RemoteAccessApi* | [**delete_remote_access_user_public_keys_keyid**](docs/RemoteAccessApi.md#delete_remote_access_user_public_keys_keyid) | **DELETE** /remote-access/user/public-keys/{keyId} | Remove ssh public key from user
*RemoteAccessApi* | [**get_remote_access_device_deviceuuid**](docs/RemoteAccessApi.md#get_remote_access_device_deviceuuid) | **GET** /remote-access/device/{deviceUuid} | Fetch remote access info for a device
*RemoteAccessApi* | [**get_remote_access_device_deviceuuid_sessions**](docs/RemoteAccessApi.md#get_remote_access_device_deviceuuid_sessions) | **GET** /remote-access/device/{deviceUuid}/sessions | get a remote access session for a device
*RemoteAccessApi* | [**get_remote_access_user_ip_accept_list**](docs/RemoteAccessApi.md#get_remote_access_user_ip_accept_list) | **GET** /remote-access/user/ip-accept-list | Retrieve list of accepted ip addresses
*RemoteAccessApi* | [**get_remote_access_user_public_keys**](docs/RemoteAccessApi.md#get_remote_access_user_public_keys) | **GET** /remote-access/user/public-keys | Fetch all remote-access public keys registered to a user
*RemoteAccessApi* | [**get_remote_access_user_sessions**](docs/RemoteAccessApi.md#get_remote_access_user_sessions) | **GET** /remote-access/user/sessions | Fetch all sessions (and their related deviceId) for a user
*RemoteAccessApi* | [**post_remote_access_device_deviceuuid_sessions**](docs/RemoteAccessApi.md#post_remote_access_device_deviceuuid_sessions) | **POST** /remote-access/device/{deviceUuid}/sessions | Create new remote access session for device
*RemoteAccessApi* | [**post_remote_access_user_ip_accept_list**](docs/RemoteAccessApi.md#post_remote_access_user_ip_accept_list) | **POST** /remote-access/user/ip-accept-list | Add new ip to list of accepted ip addresses
*RemoteAccessApi* | [**post_remote_access_user_public_keys**](docs/RemoteAccessApi.md#post_remote_access_user_public_keys) | **POST** /remote-access/user/public-keys | Register an ssh public key to user
*UpdatesApi* | [**delete_lockboxes_lockbox_name**](docs/UpdatesApi.md#delete_lockboxes_lockbox_name) | **DELETE** /lockboxes/{lockbox_name} | Delete a lockbox
*UpdatesApi* | [**get_lockbox_details**](docs/UpdatesApi.md#get_lockbox_details) | **GET** /lockbox-details | List all existing lockboxes on the repository, and their detailed contents
*UpdatesApi* | [**get_lockboxes**](docs/UpdatesApi.md#get_lockboxes) | **GET** /lockboxes | List all existing lockboxes on the repository
*UpdatesApi* | [**get_lockboxes_lockbox_name**](docs/UpdatesApi.md#get_lockboxes_lockbox_name) | **GET** /lockboxes/{lockbox_name} | Get the raw Uptane metadata for a lockbox
*UpdatesApi* | [**patch_updates**](docs/UpdatesApi.md#patch_updates) | **PATCH** /updates | Cancel a pending update for one or more devices
*UpdatesApi* | [**post_lockboxes_lockbox_name**](docs/UpdatesApi.md#post_lockboxes_lockbox_name) | **POST** /lockboxes/{lockbox_name} | Define a new lockbox, or update an existing one
*UpdatesApi* | [**post_updates**](docs/UpdatesApi.md#post_updates) | **POST** /updates | Launch an update to one or more devices or fleets


## Documentation For Models

 - [BadRequestRepr](docs/BadRequestRepr.md)
 - [ClientSignature](docs/ClientSignature.md)
 - [ConflictRepr](docs/ConflictRepr.md)
 - [CreateFleet](docs/CreateFleet.md)
 - [CreateLockboxRequest](docs/CreateLockboxRequest.md)
 - [CreateSessionRequest](docs/CreateSessionRequest.md)
 - [CustomUpdateData](docs/CustomUpdateData.md)
 - [DelegationInfo](docs/DelegationInfo.md)
 - [DetailedMetricQuery](docs/DetailedMetricQuery.md)
 - [DeviceCreateReq](docs/DeviceCreateReq.md)
 - [DeviceInfo](docs/DeviceInfo.md)
 - [DeviceInfoBasic](docs/DeviceInfoBasic.md)
 - [DeviceInfoExtended](docs/DeviceInfoExtended.md)
 - [DeviceNameRequest](docs/DeviceNameRequest.md)
 - [DeviceNotesRequest](docs/DeviceNotesRequest.md)
 - [DevicePackage](docs/DevicePackage.md)
 - [DevicePackages](docs/DevicePackages.md)
 - [DeviceSession](docs/DeviceSession.md)
 - [DeviceSort](docs/DeviceSort.md)
 - [DeviceSortDirection](docs/DeviceSortDirection.md)
 - [DeviceStatus](docs/DeviceStatus.md)
 - [EcuInfoImage](docs/EcuInfoImage.md)
 - [EcuInfoResponse](docs/EcuInfoResponse.md)
 - [EditPackage](docs/EditPackage.md)
 - [ErrorRepresentation](docs/ErrorRepresentation.md)
 - [ExternalPackage](docs/ExternalPackage.md)
 - [FileInfo](docs/FileInfo.md)
 - [Fleet](docs/Fleet.md)
 - [FleetMetricsOutliersRequest](docs/FleetMetricsOutliersRequest.md)
 - [FleetMetricsOutliersResponse](docs/FleetMetricsOutliersResponse.md)
 - [FleetType](docs/FleetType.md)
 - [Image](docs/Image.md)
 - [InstalledPackage](docs/InstalledPackage.md)
 - [IpAddressRequest](docs/IpAddressRequest.md)
 - [JsonSignedPayload](docs/JsonSignedPayload.md)
 - [KeyData](docs/KeyData.md)
 - [LastSshSession](docs/LastSshSession.md)
 - [MetricsResponse](docs/MetricsResponse.md)
 - [NetworkInfo](docs/NetworkInfo.md)
 - [NotFoundRepr](docs/NotFoundRepr.md)
 - [Outlier](docs/Outlier.md)
 - [OutlierAggregationMethod](docs/OutlierAggregationMethod.md)
 - [OutlierValues](docs/OutlierValues.md)
 - [Package](docs/Package.md)
 - [PackageInfo](docs/PackageInfo.md)
 - [PaginationResultComToradexApiGwDataDeviceInfoBasic](docs/PaginationResultComToradexApiGwDataDeviceInfoBasic.md)
 - [PaginationResultComToradexApiGwDataDevicePackages](docs/PaginationResultComToradexApiGwDataDevicePackages.md)
 - [PaginationResultComToradexApiGwDataFleet](docs/PaginationResultComToradexApiGwDataFleet.md)
 - [PaginationResultComToradexApiGwDataNetworkInfo](docs/PaginationResultComToradexApiGwDataNetworkInfo.md)
 - [PaginationResultComToradexApiGwDataPackagesExternalPackage](docs/PaginationResultComToradexApiGwDataPackagesExternalPackage.md)
 - [PaginationResultComToradexApiGwDataPackagesPackage](docs/PaginationResultComToradexApiGwDataPackagesPackage.md)
 - [PaginationResultJavaLangString](docs/PaginationResultJavaLangString.md)
 - [ProvisionInfo](docs/ProvisionInfo.md)
 - [PublicKeys](docs/PublicKeys.md)
 - [QueueResponse](docs/QueueResponse.md)
 - [RangeNotSatisfiableRepr](docs/RangeNotSatisfiableRepr.md)
 - [Series](docs/Series.md)
 - [SeriesMeta](docs/SeriesMeta.md)
 - [SignatureMethod](docs/SignatureMethod.md)
 - [SimpleDeviceInfo](docs/SimpleDeviceInfo.md)
 - [SimpleDeviceNotAffectedInfo](docs/SimpleDeviceNotAffectedInfo.md)
 - [SortDirection](docs/SortDirection.md)
 - [SshSession](docs/SshSession.md)
 - [TargetImage](docs/TargetImage.md)
 - [TargetItemsSort](docs/TargetItemsSort.md)
 - [TimeAggregation](docs/TimeAggregation.md)
 - [TimeAggregationMethod](docs/TimeAggregationMethod.md)
 - [Tuple2ComToradexApiGwDataDeviceTagIdComToradexApiGwDataDeviceTagValue](docs/Tuple2ComToradexApiGwDataDeviceTagIdComToradexApiGwDataDeviceTagValue.md)
 - [Tuple2ScalaLongScalaOptionScalaDouble](docs/Tuple2ScalaLongScalaOptionScalaDouble.md)
 - [UpdateCreateResult](docs/UpdateCreateResult.md)
 - [UpdateFleet](docs/UpdateFleet.md)
 - [UpdateHibernationStatusRequest](docs/UpdateHibernationStatusRequest.md)
 - [UpdateRequest](docs/UpdateRequest.md)
 - [UpstreamEndpointErrorRepr](docs/UpstreamEndpointErrorRepr.md)
 - [UserInfo](docs/UserInfo.md)
 - [UserSession](docs/UserSession.md)


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


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

- **Type**: Bearer authentication


## Author