Daniel Widdis 1fbdd03a71
Add documentation for Search Workflow State API (#6546)
* Add documentation for Search Workflow State API

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Improve wording per review suggestions

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Match indendation on example queries

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
2024-03-05 13:32:24 -05:00

1.2 KiB

layout, title, parent, nav_order
layout title parent nav_order
default Search for a workflow Workflow APIs 60

Search for a workflow

This is an experimental feature and is not recommended for use in a production environment. For updates on the progress of the feature or if you want to leave feedback, see the associated GitHub issue.
{: .warning}

You can retrieve created workflows with their workflow_id or search for workflows by using a query matching a field. You can use the use_case field to search for similar workflows.

Path and HTTP methods

GET /_plugins/_flow_framework/workflow/_search
POST /_plugins/_flow_framework/workflow/_search

Example request: All created workflows

GET /_plugins/_flow_framework/workflow/_search
{
  "query": {
    "match_all": {}
  }
}

{% include copy-curl.html %}

Example request: All workflows with a use_case of REMOTE_MODEL_DEPLOYMENT

GET /_plugins/_flow_framework/workflow/_search
{
  "query": {
    "match": {
      "use_case": "REMOTE_MODEL_DEPLOYMENT"
    }
  }
}

{% include copy-curl.html %}

Example response

OpenSearch responds with a list of workflow templates matching the search parameters.