Skip to content

waylayio/waylay-sdk-rules-py

Repository files navigation

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.20.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.10+.

Installation

Normally this package is installed together with support for other services using the waylay-sdk umbrella package:

  • pip install waylay-sdk will install waylay-sdk-rules together with the SDK api packages for other services.
  • pip install waylay-sdk[types-rules] will additionally install the types package waylay-sdk-rules-types.
  • pip install waylay-sdk[types] will install the types packages for this and all other services.

Alternatively, you can install support for this rules service only, installing or extending an existing waylay-sdk-core:

  • pip install waylay-sdk-rules to only install api support for rules.
  • pip install waylay-sdk-rules[types] to additionally install type support for rules.

Usage

# 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(f"Response: {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

SDK Path Method HTTP request Description
waylay_client.rules.about get GET /rules/v1 Get Service Information
waylay_client.rules.plugs_execution execute_actuator POST /rules/v1/actions/{name} Execute Latest Actuator Version
waylay_client.rules.plugs_execution execute_actuator_version POST /rules/v1/actions/{name}/versions/{version} Execute Specified Actuator Version
waylay_client.rules.plugs_execution execute_sensor POST /rules/v1/sensors/{name} Execute Latest Sensor Version
waylay_client.rules.plugs_execution execute_sensor_version POST /rules/v1/sensors/{name}/versions/{version} Execute Specified Sensor Version
waylay_client.rules.plugs_execution execute_transformer POST /rules/v1/transformers/{name} Execute Latest Transformer Version
waylay_client.rules.plugs_execution execute_transformer_version POST /rules/v1/transformers/{name}/versions/{version} Execute Specified Transformer Version
waylay_client.rules.push_data push POST /rules/v1/data Push Streaming Data
waylay_client.rules.task_nodes get_states GET /rules/v1/tasks/{taskId}/nodes/{nodeId}/states Get Supported States
waylay_client.rules.task_nodes get GET /rules/v1/tasks/{taskId}/nodes/{nodeId} Get Current States
waylay_client.rules.task_nodes patch PATCH /rules/v1/tasks/{taskId}/nodes/{nodeId} Set Node State
waylay_client.rules.task_nodes post POST /rules/v1/tasks/callback Finalize Asynchronous Execution With Token
waylay_client.rules.task_nodes update POST /rules/v1/tasks/{taskId}/nodes/{nodeId} Set Current State
waylay_client.rules.tasks create POST /rules/v1/tasks Create Task
waylay_client.rules.tasks delete DELETE /rules/v1/tasks/{taskId} Delete Task
waylay_client.rules.tasks get_configuration GET /rules/v1/tasks/{taskId}/conf Get Task Configuration
waylay_client.rules.tasks get GET /rules/v1/tasks/{taskId} Retrieve Task Details
waylay_client.rules.tasks list GET /rules/v1/tasks Query Multiple Tasks
waylay_client.rules.tasks replace PUT /rules/v1/tasks/{taskId} Update Task
waylay_client.rules.tasks start POST /rules/v1/tasks/{taskId}/command/start Start Task
waylay_client.rules.tasks stop POST /rules/v1/tasks/{taskId}/command/stop Stop Task
waylay_client.rules.tasks_batch_operations get GET /rules/v1/batch/{batchId} Get Tasks Batch Operation Status
waylay_client.rules.tasks_batch_operations start POST /rules/v1/batch Start Batch Operations
waylay_client.rules.template_runs debug_graph POST /rules/v1/templates/debug Debug Graph Or Bayesian Network
waylay_client.rules.template_runs debug POST /rules/v1/templates/{name}/debug Debug Template
waylay_client.rules.template_runs run_graph POST /rules/v1/templates/run Run Graph Or Bayesian Network
waylay_client.rules.template_runs run POST /rules/v1/templates/{name}/run Run Template
waylay_client.rules.templates copy PATCH /rules/v1/templates/{name} Copy Template
waylay_client.rules.templates create POST /rules/v1/templates Create Template
waylay_client.rules.templates delete DELETE /rules/v1/templates/{name} Delete Template
waylay_client.rules.templates get_discovery GET /rules/v1/discoveryTemplate Retrieve Discovery Template
waylay_client.rules.templates get GET /rules/v1/templates/{name} Retrieve Template Details
waylay_client.rules.templates list GET /rules/v1/templates List Templates
waylay_client.rules.templates replace PUT /rules/v1/templates/{name} Update Template
waylay_client.rules.templates set PUT /rules/v1/discoveryTemplate Set Discovery Template
waylay_client.rules.templates upgrade_plugins PATCH /rules/v1/templates Upgrade Plugins

Documentation For Models

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors