Skip to content

Latest commit

 

History

History
466 lines (361 loc) · 19 KB

PlugsExecutionApi.md

File metadata and controls

466 lines (361 loc) · 19 KB

waylay.services.rules.PlugsExecutionApi

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

Method HTTP request Description
execute_actuator POST /rules/v1/actions/{name} Execute Latest Actuator Version
execute_actuator_version POST /rules/v1/actions/{name}/versions/{version} Execute Specified Actuator Version
execute_sensor POST /rules/v1/sensors/{name} Execute Latest Sensor Version
execute_sensor_version POST /rules/v1/sensors/{name}/versions/{version} Execute Specified Sensor Version
execute_transformer POST /rules/v1/transformers/{name} Execute Latest Transformer Version
execute_transformer_version POST /rules/v1/transformers/{name}/versions/{version} Execute Specified Transformer Version

execute_actuator

execute_actuator( name: str, headers ) -> ActuatorExecutionResult

Execute Latest Actuator Version

Execute latest version of an actuator.

Example

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.actuator_execution_result import ActuatorExecutionResult
from waylay.services.rules.models.execute_plugs_specification import ExecutePlugsSpecification
try:
    # Execute Latest Actuator Version
    # calls `POST /rules/v1/actions/{name}`
    api_response = await waylay_client.rules.plugs_execution.execute_actuator(
        'name_example', # name | path param "name"
        # json data: use a generated model or a json-serializable python data structure (dict, list)
        json = waylay.services.rules.ExecutePlugsSpecification() # ExecutePlugsSpecification | Specification to execute a plug.
    )
    print("The response of rules.plugs_execution.execute_actuator:\n")
    pprint(api_response)
except ApiError as e:
    print("Exception when calling rules.plugs_execution.execute_actuator: %s\n" % e)

Endpoint

POST /rules/v1/actions/{name}

Parameters

Name Type API binding Description Notes
name str path parameter "name"
json ExecutePlugsSpecification json request body Specification to execute a plug.
headers HeaderTypes request headers

Return type

Selected path param Raw response param Return Type Description Links
Literal[""] (default) False (default) ActuatorExecutionResult ActuatorExecutionResult
str False (default) Any If any other string value for the selected path is provided, the exact type of the response will only be known at runtime.
/ True Response The raw http response object.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully Executed -
400 Unsuccessfully Executed -
404 Actuator Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

execute_actuator_version

execute_actuator_version( name: str, version: str, headers ) -> ActuatorExecutionResult

Execute Specified Actuator Version

Execute specified version of an actuator.

Example

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.actuator_execution_result import ActuatorExecutionResult
from waylay.services.rules.models.execute_plugs_specification import ExecutePlugsSpecification
try:
    # Execute Specified Actuator Version
    # calls `POST /rules/v1/actions/{name}/versions/{version}`
    api_response = await waylay_client.rules.plugs_execution.execute_actuator_version(
        'name_example', # name | path param "name"
        'version_example', # version | path param "version"
        # json data: use a generated model or a json-serializable python data structure (dict, list)
        json = waylay.services.rules.ExecutePlugsSpecification() # ExecutePlugsSpecification | Specification to execute a plug.
    )
    print("The response of rules.plugs_execution.execute_actuator_version:\n")
    pprint(api_response)
except ApiError as e:
    print("Exception when calling rules.plugs_execution.execute_actuator_version: %s\n" % e)

Endpoint

POST /rules/v1/actions/{name}/versions/{version}

Parameters

Name Type API binding Description Notes
name str path parameter "name"
version str path parameter "version" Version number of plugin
json ExecutePlugsSpecification json request body Specification to execute a plug.
headers HeaderTypes request headers

Return type

Selected path param Raw response param Return Type Description Links
Literal[""] (default) False (default) ActuatorExecutionResult ActuatorExecutionResult
str False (default) Any If any other string value for the selected path is provided, the exact type of the response will only be known at runtime.
/ True Response The raw http response object.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully Executed -
400 Unsuccessfully Executed -
404 Actuator Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

execute_sensor

execute_sensor( name: str, headers ) -> SensorExecutionResult

Execute Latest Sensor Version

Execute latest version of a sensor.

Example

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.execute_plugs_specification import ExecutePlugsSpecification
from waylay.services.rules.models.sensor_execution_result import SensorExecutionResult
try:
    # Execute Latest Sensor Version
    # calls `POST /rules/v1/sensors/{name}`
    api_response = await waylay_client.rules.plugs_execution.execute_sensor(
        'name_example', # name | path param "name"
        # json data: use a generated model or a json-serializable python data structure (dict, list)
        json = waylay.services.rules.ExecutePlugsSpecification() # ExecutePlugsSpecification | Specification to execute a plug.
    )
    print("The response of rules.plugs_execution.execute_sensor:\n")
    pprint(api_response)
except ApiError as e:
    print("Exception when calling rules.plugs_execution.execute_sensor: %s\n" % e)

Endpoint

POST /rules/v1/sensors/{name}

Parameters

Name Type API binding Description Notes
name str path parameter "name"
json ExecutePlugsSpecification json request body Specification to execute a plug.
headers HeaderTypes request headers

Return type

Selected path param Raw response param Return Type Description Links
Literal[""] (default) False (default) SensorExecutionResult SensorExecutionResult
str False (default) Any If any other string value for the selected path is provided, the exact type of the response will only be known at runtime.
/ True Response The raw http response object.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully Executed -
400 Unsuccessfully Executed -
404 Sensor Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

execute_sensor_version

execute_sensor_version( name: str, version: str, headers ) -> SensorExecutionResult

Execute Specified Sensor Version

Execute the specified version of a sensor.

Example

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.execute_plugs_specification import ExecutePlugsSpecification
from waylay.services.rules.models.sensor_execution_result import SensorExecutionResult
try:
    # Execute Specified Sensor Version
    # calls `POST /rules/v1/sensors/{name}/versions/{version}`
    api_response = await waylay_client.rules.plugs_execution.execute_sensor_version(
        'name_example', # name | path param "name"
        'version_example', # version | path param "version"
        # json data: use a generated model or a json-serializable python data structure (dict, list)
        json = waylay.services.rules.ExecutePlugsSpecification() # ExecutePlugsSpecification | Specification to execute a plug.
    )
    print("The response of rules.plugs_execution.execute_sensor_version:\n")
    pprint(api_response)
except ApiError as e:
    print("Exception when calling rules.plugs_execution.execute_sensor_version: %s\n" % e)

Endpoint

POST /rules/v1/sensors/{name}/versions/{version}

Parameters

Name Type API binding Description Notes
name str path parameter "name"
version str path parameter "version" Version number of plugin
json ExecutePlugsSpecification json request body Specification to execute a plug.
headers HeaderTypes request headers

Return type

Selected path param Raw response param Return Type Description Links
Literal[""] (default) False (default) SensorExecutionResult SensorExecutionResult
str False (default) Any If any other string value for the selected path is provided, the exact type of the response will only be known at runtime.
/ True Response The raw http response object.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully Executed -
400 Unsuccessfully Executed -
404 Sensor Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

execute_transformer

execute_transformer( name: str, headers ) -> TransformerExecutionResult

Execute Latest Transformer Version

Execute the latest transformer version.

Example

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.execute_plugs_specification import ExecutePlugsSpecification
from waylay.services.rules.models.transformer_execution_result import TransformerExecutionResult
try:
    # Execute Latest Transformer Version
    # calls `POST /rules/v1/transformers/{name}`
    api_response = await waylay_client.rules.plugs_execution.execute_transformer(
        'name_example', # name | path param "name"
        # json data: use a generated model or a json-serializable python data structure (dict, list)
        json = waylay.services.rules.ExecutePlugsSpecification() # ExecutePlugsSpecification | Specification to execute a plug.
    )
    print("The response of rules.plugs_execution.execute_transformer:\n")
    pprint(api_response)
except ApiError as e:
    print("Exception when calling rules.plugs_execution.execute_transformer: %s\n" % e)

Endpoint

POST /rules/v1/transformers/{name}

Parameters

Name Type API binding Description Notes
name str path parameter "name"
json ExecutePlugsSpecification json request body Specification to execute a plug.
headers HeaderTypes request headers

Return type

Selected path param Raw response param Return Type Description Links
Literal[""] (default) False (default) TransformerExecutionResult TransformerExecutionResult
str False (default) Any If any other string value for the selected path is provided, the exact type of the response will only be known at runtime.
/ True Response The raw http response object.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully Executed -
400 Unsuccessfully Executed -
404 Transformer Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

execute_transformer_version

execute_transformer_version( name: str, version: str, headers ) -> TransformerExecutionResult

Execute Specified Transformer Version

Execute specified version of a transformer.

Example

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.execute_plugs_specification import ExecutePlugsSpecification
from waylay.services.rules.models.transformer_execution_result import TransformerExecutionResult
try:
    # Execute Specified Transformer Version
    # calls `POST /rules/v1/transformers/{name}/versions/{version}`
    api_response = await waylay_client.rules.plugs_execution.execute_transformer_version(
        'name_example', # name | path param "name"
        'version_example', # version | path param "version"
        # json data: use a generated model or a json-serializable python data structure (dict, list)
        json = waylay.services.rules.ExecutePlugsSpecification() # ExecutePlugsSpecification | Specification to execute a plug.
    )
    print("The response of rules.plugs_execution.execute_transformer_version:\n")
    pprint(api_response)
except ApiError as e:
    print("Exception when calling rules.plugs_execution.execute_transformer_version: %s\n" % e)

Endpoint

POST /rules/v1/transformers/{name}/versions/{version}

Parameters

Name Type API binding Description Notes
name str path parameter "name"
version str path parameter "version" Version number of plugin
json ExecutePlugsSpecification json request body Specification to execute a plug.
headers HeaderTypes request headers

Return type

Selected path param Raw response param Return Type Description Links
Literal[""] (default) False (default) TransformerExecutionResult TransformerExecutionResult
str False (default) Any If any other string value for the selected path is provided, the exact type of the response will only be known at runtime.
/ True Response The raw http response object.

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully Executed -
400 Unsuccessfully Executed -
404 Transformer Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]