opensearch-docs-cn/_automating-workflows/api/get-workflow-status.md

111 lines
2.9 KiB
Markdown
Raw Normal View History

Add flow framework documentation (#6257) * Add flow framework documentation Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tech review comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update _automating-workflows/api/create-workflow.md Co-authored-by: Owais Kazi <owaiskazi19@gmail.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Add callout of edges being optional Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add unregister to word list Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add registering local pretrained and custom models Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _automating-workflows/api/deprovision-workflow.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _automating-workflows/workflow-steps.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Added Flow Framework plugin to Vale Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * More editorial comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update _automating-workflows/api/get-workflow-status.md Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _automating-workflows/api/get-workflow-status.md Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Add note about provisioning Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update _automating-workflows/index.md Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _automating-workflows/workflow-steps.md Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * More editorial comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Removed code font from headings Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add agent documentation links Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add experimental label and more links Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add sample templates link Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added a tracking issue to warning Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Owais Kazi <owaiskazi19@gmail.com> Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
2024-02-07 18:44:49 -05:00
---
layout: default
title: Get a workflow status
parent: Workflow APIs
nav_order: 40
---
# Get a workflow status
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](https://github.com/opensearch-project/flow-framework/issues/475).
{: .warning}
[Provisioning a workflow]({{site.url}}{{site.baseurl}}/automating-workflows/api/provision-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
```json
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`:
```json
GET /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50/_status?all=true
```
{% include copy-curl.html %}
#### Example request
```json
GET /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50/_status
```
{% include copy-curl.html %}
#### 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:
```json
{
"workflow_id" : "8xL8bowB8y25Tqfenm50",
"state": "NOT_STARTED"
}
```
While provisioning is in progress, OpenSearch returns a partial resource list:
```json
{
"workflow_id" : "8xL8bowB8y25Tqfenm50",
"state": "PROVISIONING",
"resources_created": [
{
"workflow_step_name": "create_connector",
"workflow_step_id": "create_connector_1",
"connector_id": "NdjCQYwBLmvn802B0IwE"
}
]
}
```
Upon provisioning completion, OpenSearch returns the full resource list:
```json
{
"workflow_id" : "8xL8bowB8y25Tqfenm50",
"state": "COMPLETED",
"resources_created": [
{
"workflow_step_name": "create_connector",
"workflow_step_id": "create_connector_1",
"connector_id": "NdjCQYwBLmvn802B0IwE"
},
{
"workflow_step_name": "register_remote_model",
"workflow_step_id": "register_model_2",
"model_id": "N9jCQYwBLmvn802B0oyh"
}
]
}
```