Skip to main content

Torizon OTA v2 API

Project description

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 project:

  • API version: 2.0
  • Package version: 0.0.6
  • 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:

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:

import torizon_io_api

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import torizon_io_api

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

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/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = torizon_io_api.Configuration(
    host = "https://app.torizon.io/api/v2"
)

# 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/v2

Class Method HTTP request Description
DeviceMetricsApi 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 GET /device-data/devices/{deviceUuid}/metrics Get metrics data from a single device
DeviceMetricsApi 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 GET /device-data/metric-names Get the list of metrics available in your repository
DeviceMetricsApi 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 POST /device-data/fleets/{fleetId}/metrics/report Get metrics report for fleet of devices
DevicesApi delete_devices_deviceuuid DELETE /devices/{deviceUuid} Delete a single device
DevicesApi get_devices GET /devices Query device information
DevicesApi get_devices_deviceuuid GET /devices/{deviceUuid} Get detailed information about a single device
DevicesApi get_devices_name_deviceuuid GET /devices/name/{deviceUuid} Get the display name of a single device
DevicesApi get_devices_network GET /devices/network Get network information for many devices
DevicesApi get_devices_network_deviceuuid GET /devices/network/{deviceUuid} Get network information for a single device
DevicesApi get_devices_notes_deviceuuid GET /devices/notes/{deviceUuid} Get the device notes for a specific device
DevicesApi get_devices_packages GET /devices/packages Get information about the installed packages for many devices
DevicesApi get_devices_packages_deviceuuid GET /devices/packages/{deviceUuid} Get information about the installed packages for a single device
DevicesApi get_devices_token GET /devices/token Retrieve device provisioning token
DevicesApi 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 GET /devices/uptane/{deviceUuid}/components Get a list of the software components reported by a single device
DevicesApi post_devices POST /devices Manually create a new device
DevicesApi post_devices_packages POST /devices/packages Get information about the installed packages for many devices
DevicesApi put_devices_hibernation_deviceuuid PUT /devices/hibernation/{deviceUuid} Set the hibernation status of a device
DevicesApi put_devices_name_deviceuuid PUT /devices/name/{deviceUuid} Set the display name of a single device
DevicesApi put_devices_notes_deviceuuid PUT /devices/notes/{deviceUuid} Set the device notes for a specific device
FleetsApi delete_fleets_fleetid DELETE /fleets/{fleetId} Delete a fleet
FleetsApi delete_fleets_fleetid_devices DELETE /fleets/{fleetId}/devices Remove devices from a fleet
FleetsApi get_fleets GET /fleets Get information about all fleets in your repository
FleetsApi get_fleets_fleetid GET /fleets/{fleetId} Get information about a single fleet in your repository
FleetsApi get_fleets_fleetid_devices GET /fleets/{fleetId}/devices Get information about the devices in a single fleet
FleetsApi post_fleets POST /fleets Create a new fleet
FleetsApi post_fleets_fleetid_devices POST /fleets/{fleetId}/devices Add devices to a fleet
FleetsApi put_fleets_fleetid PUT /fleets/{fleetId} Update fleet
PackagesApi delete_packages_packageid DELETE /packages/{packageId} Delete a package
PackagesApi get_packages GET /packages Retrieve metadata about packages in your repository
PackagesApi get_packages_external GET /packages_external Retrieve metadata about packages in your repository from other sources
PackagesApi get_packages_external_info GET /packages_external/info Fetch information about external package sources
PackagesApi get_packages_external_refresh_source_file_name GET /packages_external/refresh/{source_file_name} Refresh metadata from an external package source
PackagesApi get_packages_packageid GET /packages/{packageId} Retrieve metadata about a single package
PackagesApi patch_packages_packageid PATCH /packages/{packageId} Edit metadata about a package
PackagesApi post_packages POST /packages Upload a new package
RemoteAccessApi 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 DELETE /remote-access/user/ip-accept-list/{ip-address} Remove accepted ip address
RemoteAccessApi 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 GET /remote-access/device/{deviceUuid} Fetch remote access info for a device
RemoteAccessApi 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 GET /remote-access/user/ip-accept-list Retrieve list of accepted ip addresses
RemoteAccessApi 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 GET /remote-access/user/sessions Fetch all sessions (and their related deviceId) for a user
RemoteAccessApi 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 POST /remote-access/user/ip-accept-list Add new ip to list of accepted ip addresses
RemoteAccessApi post_remote_access_user_public_keys POST /remote-access/user/public-keys Register an ssh public key to user
UpdatesApi delete_lockboxes_lockbox_name DELETE /lockboxes/{lockbox_name} Delete a lockbox
UpdatesApi get_lockbox_details GET /lockbox-details List all existing lockboxes on the repository, and their detailed contents
UpdatesApi get_lockboxes GET /lockboxes List all existing lockboxes on the repository
UpdatesApi get_lockboxes_lockbox_name GET /lockboxes/{lockbox_name} Get the raw Uptane metadata for a lockbox
UpdatesApi get_updates_devices_deviceid GET /updates/devices/{deviceId} list updates
UpdatesApi patch_updates_updateid PATCH /updates/{updateId} Cancel an update
UpdatesApi post_lockboxes_lockbox_name POST /lockboxes/{lockbox_name} Define a new lockbox, or update an existing one
UpdatesApi post_updates POST /updates Launch an update to one or more devices or fleets

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torizon_io_api-0.0.6.tar.gz (75.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torizon_io_api-0.0.6-py3-none-any.whl (203.7 kB view details)

Uploaded Python 3

File details

Details for the file torizon_io_api-0.0.6.tar.gz.

File metadata

  • Download URL: torizon_io_api-0.0.6.tar.gz
  • Upload date:
  • Size: 75.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for torizon_io_api-0.0.6.tar.gz
Algorithm Hash digest
SHA256 30305469833e2e0834587975eb0d6b258c3d278e14e1d6cc8c96d164ec50dac4
MD5 8788865284b5860c38da6db6cf25b014
BLAKE2b-256 587fea39170917bc740b7318463f2c7118c5c3eb0cd127d1c08dfe2974ca2950

See more details on using hashes here.

File details

Details for the file torizon_io_api-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: torizon_io_api-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 203.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for torizon_io_api-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 abae450d935e59635b2f043c44852f2a02f1415d1ab88ea1aea04439ba5436c2
MD5 c431c9f7ac272cf12230fabd0af4b281
BLAKE2b-256 6f6aa80142a1eeae18408a685c395863d19de9666da78ae70c71a0000030f15e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page