Link Search Menu Expand Document Documentation Menu

You're viewing version 2.13 of the OpenSearch documentation. This version is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

Get a workflow status

Provisioning a workflow may take a significant amount of time, particularly when the action is associated with OpenSearch indexing operations. The Get Workflow State API permits monitoring of the provisioning deployment status until it is complete.

Path and HTTP methods

GET /_plugins/_flow_framework/workflow/<workflow_id>/_status

Path parameters

The following table lists the available path parameters.

Parameter Data type Description
workflow_id String The ID of the workflow from which to obtain the status. Required for the PUT method.

Query parameters

The all parameter specifies whether the response should return all fields.

When set to false (the default), the response contains the following fields:

  • workflow_id
  • any error state
  • state
  • a list of resources_created

When set to true, the response contains the following additional fields:

  • provisioning_progress
  • provision_start_time
  • provision_end_time
  • user
  • user_outputs

To receive all available fields in the response, set all to true:

GET /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50/_status?all=true

Example request

GET /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50/_status

Example response

OpenSearch responds with a summary of the provisioning status and a list of created resources.

Before provisioning has begun, OpenSearch does not return any resources:

{
  "workflow_id" : "8xL8bowB8y25Tqfenm50",
  "state": "NOT_STARTED"
}

While provisioning is in progress, OpenSearch returns a partial resource list:

{
  "workflow_id" : "8xL8bowB8y25Tqfenm50",
  "state": "PROVISIONING",
  "resources_created": [
    {
      "workflow_step_name": "create_connector",
      "workflow_step_id": "create_connector_1",
      "resource_type": "connector_id",
      "resource_id": "NdjCQYwBLmvn802B0IwE"
    }
  ]
}

Upon provisioning completion, OpenSearch returns the full resource list:

{
  "workflow_id" : "8xL8bowB8y25Tqfenm50",
  "state": "COMPLETED",
  "resources_created": [
    {
      "workflow_step_name": "create_connector",
      "workflow_step_id": "create_connector_1",
      "resource_type": "connector_id",
      "resource_id": "NdjCQYwBLmvn802B0IwE"
    },
    {
      "workflow_step_name": "register_remote_model",
      "workflow_step_id": "register_model_2",
      "resource_type": "model_id",
      "resource_id": "N9jCQYwBLmvn802B0oyh"
    }
  ]
}
350 characters left

Have a question? .

Want to contribute? or .