Python SDK
Use the Python SDK to get started quickly with using the REST APIs. You can use the SDK for device types that were created in versions earlier than 8.8. The SDK cannot be used with device types that were created in version 8.8 or later.
Using the modules, you can interact with the REST APIs to:
- Manage device types
- Manage dimensions
- Manage metrics
- Manage constants
- Load metric data
Modules
| Description | Module | Input | Output | Script |
|---|---|---|---|---|
| Read metric data for an existing device type | load_metrics_data_from_csv |
|
None | Loading data from csv script |
| Delete a device type | remove_entity_type |
|
API response | Removing device type, functions, constants, dimensions script |
| Add metric (KPI) functions to a device type | add_functions |
|
None | Creating entities, adding functions, constants, dimensions script |
| Get all of the metric (KPI) functions of a device type | get_functions |
|
List of dict with metric (KPI) functions (API response) | Getting functions, constants, and dimensions script |
| Delete a metric (KPI) function of a device type | remove_function |
|
API response | Removing device type, functions, constants, dimensions script |
| Register a constant globally | create_constants |
|
API response | None |
| Get all of constants for a tenant | get_constants |
|
list of dict with constants information (API response) | Get functions, constants, and dimensions script |
| Update constants for a tenant | update_constants |
|
API response | None |
| Unregister constants by name | remove_constants |
|
API response | None |
| Add dimension data to entities | add_dimensions_data |
|
API response | Creating entities, adding functions, constants, dimensions script |
| Get all the dimensional data for a device type | get_dimensions_data |
|
List of dict with dimension data information (API response) | Getting functions, constants, and dimensions script |
| Update dimension data | update_dimensions_data |
|
API response | None |
| Delete a dimension by name | remove_dimensions |
|
API response | Removing device type, functions, constants, dimensions script |
| Get all alerts using a json payload | get_alerts |
|
API response | Get alerts and update status and severity script |
| Update the alert status using the alert ID | update_alert_status |
|
None | None |
| Update the alert severity using alert ID | update_alert_severity |
|
None | None |