Get workflow steps

This API returns a list of workflow steps, including their required inputs, outputs, default timeout values, and required plugins. For example, for the register_remote_model step, the Get Workflow Steps API returns the following information:

  1. {
  2. "register_remote_model": {
  3. "inputs": [
  4. "name",
  5. "connector_id"
  6. ],
  7. "outputs": [
  8. "model_id",
  9. "register_model_status"
  10. ],
  11. "required_plugins": [
  12. "opensearch-ml"
  13. ]
  14. }
  15. }

Path and HTTP methods

  1. GET /_plugins/_flow_framework/workflow/_steps
  2. GET /_plugins/_flow_framework/workflow/_step?workflow_step=<step_name>

Query parameters

The following table lists the available query parameters. All query parameters are optional.

ParameterData typeDescription
workflow_stepStringThe name of the step to retrieve. Specify multiple step names as a comma-separated list. For example, create_connector,delete_model,deploy_model.

Example request

To fetch all workflow steps, use the following request:

  1. GET /_plugins/_flow_framework/workflow/_steps

copy

To fetch specific workflow steps, pass the step names to the request as a query parameter:

  1. GET /_plugins/_flow_framework/workflow/_step?workflow_step=create_connector,delete_model,deploy_model

copy

Example response

OpenSearch responds with the workflow steps. The order of fields in the returned steps may not exactly match the original JSON but will function identically.

To retrieve the template in YAML format, specify Content-Type: application/yaml in the request header:

  1. curl -XGET "http://localhost:9200/_plugins/_flow_framework/workflow/_steps" -H 'Content-Type: application/yaml'

To retrieve the template in JSON format, specify Content-Type: application/json in the request header:

  1. curl -XGET "http://localhost:9200/_plugins/_flow_framework/workflow/_steps" -H 'Content-Type: application/json'