Skip to main content

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

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/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 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 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 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 patch_updates PATCH /updates Cancel a pending update for one or more devices
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

Metadata

Release files for torizon-io-api 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torizon-io-api 0.0.7
File Size Uploaded
torizon_io_api-0.0.7.tar.gz 72.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for torizon-io-api 0.0.7
File Interpreter ABI Platform
torizon_io_api-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 275.5 kB

Release files / torizon_io_api-0.0.7.tar.gz

Download URL torizon_io_api-0.0.7.tar.gz
Size 72.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fa7664a089905f411752c77942dcc7d73a1cb7060f0c7249d4c9a950f53e3249
BLAKE2b-256 checksum
How to use checksums
02de2d68aa4aa66a7082ee39f94e7a7046562836375c9070099c20ccbfa78639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / torizon_io_api-0.0.7-py3-none-any.whl

Download URL torizon_io_api-0.0.7-py3-none-any.whl
Size 203.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c64383bdf7f15c9d432df2d1d6f04f7514a5745d915da5fb56b1d51bc3bd70a
BLAKE2b-256 checksum
How to use checksums
1f4f49fb9cbeb2ff2f40778ebe9ee9ed6a5750b3f90ef9838ea7226b1878c0ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page