A process to manage configuration for devices.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.0.8
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.ucentral.info/support
Python >= 3.6
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 openapi_clientInstall 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 openapi_clientPlease follow the installation procedure and then run the following:
import time
import openapi_client
from pprint import pprint
from openapi_client.api import authentication_api
from openapi_client.model.generic_error_response import GenericErrorResponse
from openapi_client.model.generic_good_answer import GenericGoodAnswer
from openapi_client.model.web_token_request import WebTokenRequest
from openapi_client.model.web_token_result import WebTokenResult
# Defining the host is optional and defaults to https://localhost:16001/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://localhost:16001/api/v1"
)
# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure Bearer authorization (JWT): bearerAuth
configuration = openapi_client.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = authentication_api.AuthenticationApi(api_client)
web_token_request = WebTokenRequest(
user_id="support@example.com",
password="support",
refresh_token="refresh_token_example",
) # WebTokenRequest | User id and password
try:
# Get access token - to be used as Bearer token header for all other API requests.
api_response = api_instance.get_access_token(web_token_request)
pprint(api_response)
except openapi_client.ApiException as e:
print("Exception when calling AuthenticationApi->get_access_token: %s\n" % e)All URIs are relative to https://localhost:16001/api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AuthenticationApi | get_access_token | POST /oauth2 | Get access token - to be used as Bearer token header for all other API requests. |
| AuthenticationApi | remove_access_token | DELETE /oauth2/{token} | Revoke a token. |
| BlacklistApi | add_to_black_list | POST /blacklist | Adds to the blacklist |
| BlacklistApi | delete_from_black_list | DELETE /blacklist | Delete from the blacklist |
| BlacklistApi | get_blacklist_device_list | GET /blacklist | Returns a list blacklisted devices. |
| CallbackApi | post_callback | POST /callbackChannel | Generic callback hook |
| CommandsApi | delete_a_command | DELETE /command/{commandUUID} | Delete a specific command |
| CommandsApi | delete_commands | DELETE /commands | Delete some commands |
| CommandsApi | delete_device_capabilities | DELETE /device/{serialNumber}/capabilities | Delete the capabilities for a given device |
| CommandsApi | delete_device_health_checks | DELETE /device/{serialNumber}/healthchecks | Delete some device health checks |
| CommandsApi | delete_device_logs | DELETE /device/{serialNumber}/logs | Delete some device logs |
| CommandsApi | delete_device_stats | DELETE /device/{serialNumber}/statistics | Get the latest statistics for a given device |
| CommandsApi | event_queue_request | POST /device/{serialNumber}/eventrequest | Request a list of queued events |
| CommandsApi | execute_command | POST /device/{serialNumber}/command | Post a command to a device |
| CommandsApi | factory_reset | POST /device/{serialNumber}/factory | Factory reset a device a device |
| CommandsApi | get_a_command_details | GET /command/{commandUUID} | Returns a specific command |
| CommandsApi | get_command_list | GET /commands | Returns a list of commands. |
| CommandsApi | get_device_capabilities | GET /device/{serialNumber}/capabilities | Get the latest capabilities for a given device |
| CommandsApi | get_device_health_checks | GET /device/{serialNumber}/healthchecks | Get the latest health checks for a given device |
| CommandsApi | get_device_logs | GET /device/{serialNumber}/logs | Get the latest logs for a given device |
| CommandsApi | get_device_stats | GET /device/{serialNumber}/statistics | Get the latest statistics for a given device |
| CommandsApi | get_device_status | GET /device/{serialNumber}/status | Get the latest status for a given device |
| CommandsApi | get_rtty_session_info | GET /device/{serialNumber}/rtty | Get the rtty parameters to initiate a session |
| CommandsApi | leds_request | POST /device/{serialNumber}/leds | Blink the LEDs on a device |
| CommandsApi | message_request | POST /device/{serialNumber}/request | Request a specific message |
| CommandsApi | reboot_device | POST /device/{serialNumber}/reboot | Upgrade a device |
| CommandsApi | trace_request | POST /device/{serialNumber}/trace | Launch a trace for a device |
| CommandsApi | update_configuration_for_a_device | POST /device/{serialNumber}/configure | Configura a device |
| CommandsApi | upgrade_device_firmware | POST /device/{serialNumber}/upgrade | Upgrade a device |
| CommandsApi | wifiscan_request | POST /device/{serialNumber}/wifiscan | Launch a wifi scan for a device |
| ConfigurationsApi | create_default_configuration | POST /default_configuration/{name} | Create a default configuration |
| ConfigurationsApi | delete_default_configuration | DELETE /default_configuration/{name} | Delete a default default configuration |
| ConfigurationsApi | get_default_configuration | GET /default_configuration/{name} | Retrieve a default configuration |
| ConfigurationsApi | get_default_configurations | GET /default_configurations | Retrieve the lists of all default configurations |
| ConfigurationsApi | update_default_configuration | PUT /default_configuration/{name} | Update a default configuration |
| DevicesApi | create_new_device | POST /device/{serialNumber} | Creating a new device |
| DevicesApi | delete_device | DELETE /device/{serialNumber} | Deleting a single device |
| DevicesApi | get_device_information | GET /device/{serialNumber} | Retrieve information for a single device |
| DevicesApi | get_device_list | GET /devices | Returns a list of devices. |
| DevicesApi | update_new_device | PUT /device/{serialNumber} | Updating a new device |
| FilesApi | delete_upload_fidelete | DELETE /file/{uuid} | Delete a file from the upload directory |
| FilesApi | get_upload_file | GET /file/{uuid} | Get a file from the upload directory |
| OUIsApi | get_ouis | GET /ouis | Get a list of OUIs |
| SystemCommandsApi | system_command | POST /system | Perform some systeme wide commands |
- AclTemplate
- AnyPayload
- BlackDeviceInfo
- BlackDeviceList
- CommandDetails
- CommandInfo
- CommandInfoList
- DefaultConfiguration
- DefaultConfigurationList
- Device
- DeviceCapabilities
- DeviceConfigureRequest
- DeviceCount
- DeviceList
- DeviceListWithStatus
- DeviceLog
- DeviceLogList
- DeviceStatus
- DeviceType
- DeviceWithStatus
- EventQueueRequest
- EventQueueResponse
- FactoryRequest
- GenericErrorResponse
- GenericGoodAnswer
- HealthCheck
- HealthCheckList
- InterfaceStatistics
- LEDsRequest
- LifetimeStatistics
- MessageRequest
- NameValuePair
- RebootRequest
- RttySessionDetails
- SerialNumberList
- StatisticsDetails
- StatisticsRecords
- StringList
- SystemCommandDetails
- SystemCommandResults
- TagValuePair
- TagValuePairList
- TraceRequest
- UpgradeRequest
- WebTokenAclTemplate
- WebTokenRequest
- WebTokenResult
- WifiBands
- WifiChannels
- WifiScanRequest
- Type: API key
- API key parameter name: X-API-KEY
- Location: HTTP header
- Type: Bearer authentication (JWT)
If the OpenAPI document is large, imports in openapi_client.apis and openapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1: Use specific imports for apis and models like:
from openapi_client.api.default_api import DefaultApifrom openapi_client.model.pet import Pet
Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
import openapi_client
from openapi_client.apis import *
from openapi_client.models import *