waylay-sdk-rules-types

Waylay rules engine Types


Keywords
Waylay, rules, engine, Types
License
Other
Install
pip install waylay-sdk-rules-types==6.5.0.20240423

Documentation

Waylay Rules Service

The REST api to manage rule tasks and rule templates in the Waylay platform.

This Python package is automatically generated based on the Waylay Rules OpenAPI specification (API version: 6.5.0) For more information, please visit the openapi specification.

It consists of two sub-packages that are both plugins for the waylay-sdk-core package.

  • The waylay-sdk-rules sub-package contains the Rules api methods.
  • The waylay-sdk-rules-types sub-package is an extension that contains the typed model classes for all path params, query params, body params and responses for each of the api methods in waylay-sdk-rules.

Requirements.

This package requires Python 3.9+.

Installation

Typically this package is installed when installing the waylay-sdk-core package to enable the service's functionality. When the service api methods are required, waylay-sdk-rules is included in:

  • pip install waylay-sdk-core[rules] to install waylay-sdk-core along with only this service, or
  • pip install waylay-sdk-core[services] to install waylay-sdk-core along with all services. When the typed models are required, both waylay-sdk-rules and waylay-sdk-rules-types are included in:
  • pip install waylay-sdk-core[rules,rules-types] to install waylay-sdk-core along with only this service including the typed models, or
  • pip install waylay-sdk-core[services,services-types] to install waylay-sdk-core along with all services along with the typed models.

Usage

from pprint import pprint

# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()

# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-rules-types` is installed
from waylay.services.rules.models.version_response import VersionResponse
try:
    # Get Service Information
    # calls `GET /rules/v1`
    api_response = await waylay_client.rules.about.get(
    )
    print("The response of rules.about.get:\n")
    pprint(api_response)
except ApiError as e:
    print("Exception when calling rules.about.get: %s\n" % e)

For more information, please visit the Waylay API documentation.

Documentation for API Endpoints

All URIs are relative to https://api.waylay.io

Class Method HTTP request Description
AboutApi get GET /rules/v1 Get Service Information
PlugsExecutionApi execute_actuator POST /rules/v1/actions/{name} Execute Latest Actuator Version
PlugsExecutionApi execute_actuator_version POST /rules/v1/actions/{name}/versions/{version} Execute Specified Actuator Version
PlugsExecutionApi execute_sensor POST /rules/v1/sensors/{name} Execute Latest Sensor Version
PlugsExecutionApi execute_sensor_version POST /rules/v1/sensors/{name}/versions/{version} Execute Specified Sensor Version
PlugsExecutionApi execute_transformer POST /rules/v1/transformers/{name} Execute Latest Transformer Version
PlugsExecutionApi execute_transformer_version POST /rules/v1/transformers/{name}/versions/{version} Execute Specified Transformer Version
PushDataApi push POST /rules/v1/data Push Streaming Data
TaskNodesApi get_states GET /rules/v1/tasks/{taskId}/nodes/{nodeId}/states Get Supported States
TaskNodesApi get GET /rules/v1/tasks/{taskId}/nodes/{nodeId} Get Current States
TaskNodesApi patch PATCH /rules/v1/tasks/{taskId}/nodes/{nodeId} Set Node State
TaskNodesApi update POST /rules/v1/tasks/{taskId}/nodes/{nodeId} Set Current State
TasksApi create POST /rules/v1/tasks Create Task
TasksApi delete DELETE /rules/v1/tasks/{taskId} Delete Task
TasksApi get_configuration GET /rules/v1/tasks/{taskId}/conf Get Task Configuration
TasksApi get GET /rules/v1/tasks/{taskId} Retrieve Task Details
TasksApi list GET /rules/v1/tasks Query Multiple Tasks
TasksApi replace PUT /rules/v1/tasks/{taskId} Update Task
TasksApi start POST /rules/v1/tasks/{taskId}/command/start Start Task
TasksApi stop POST /rules/v1/tasks/{taskId}/command/stop Stop Task
TasksBatchOperationsApi get GET /rules/v1/batch/{batchId} Get Tasks Batch Operation Status
TasksBatchOperationsApi start POST /rules/v1/batch Start Batch Operations
TemplateRunsApi run_graph POST /rules/v1/templates/run Run Graph Or Bayesian Network
TemplateRunsApi run POST /rules/v1/templates/{name}/run Run Template
TemplatesApi create POST /rules/v1/templates Create Template
TemplatesApi delete DELETE /rules/v1/templates/{name} Delete Template
TemplatesApi get_discovery GET /rules/v1/discoveryTemplate Retrieve Discovery Template
TemplatesApi get GET /rules/v1/templates/{name} Retrieve Template Details
TemplatesApi list GET /rules/v1/templates List Templates
TemplatesApi replace PUT /rules/v1/templates/{name} Update Template
TemplatesApi set PUT /rules/v1/discoveryTemplate Set Discovery Template
TemplatesApi upgrade_plugins PATCH /rules/v1/templates Upgrade Plugins

Documentation For Models