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.

You can search for resources created by workflows by matching a query to a field. The fields you can search correspond to those returned by the Get Workflow Status API.

Path and HTTP methods

  1. GET /_plugins/_flow_framework/workflow/state/_search
  2. POST /_plugins/_flow_framework/workflow/state/_search

Example request: All workflows with a state of NOT_STARTED

  1. GET /_plugins/_flow_framework/workflow/state/_search
  2. {
  3. "query": {
  4. "match": {
  5. "state": "NOT_STARTED"
  6. }
  7. }
  8. }

copy

Example request: All workflows that have a resources_created field with a workflow_step_id of register_model_2

  1. GET /_plugins/_flow_framework/workflow/state/_search
  2. {
  3. "query": {
  4. "nested": {
  5. "path": "resources_created",
  6. "query": {
  7. "bool": {
  8. "must": [
  9. {
  10. "match": {
  11. "resources_created.workflow_step_id": "register_model_2"
  12. }
  13. }
  14. ]
  15. }
  16. }
  17. }
  18. }
  19. }

copy

Example response

The response contains documents matching the search parameters.