Files
OpenSearch-Docs-Cn/_automating-workflows/api/provision-workflow.md
T
6c92b54eba Add flow framework documentation (#6257)
* Add flow framework documentation

Signed-off-by: Fanit Kolchina <[email protected]>

* Tech review comments

Signed-off-by: Fanit Kolchina <[email protected]>

* Update _automating-workflows/api/create-workflow.md

Co-authored-by: Owais Kazi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Add callout of edges being optional

Signed-off-by: Fanit Kolchina <[email protected]>

* Add unregister to word list

Signed-off-by: Fanit Kolchina <[email protected]>

* Add registering local pretrained and custom models

Signed-off-by: Fanit Kolchina <[email protected]>

* Apply suggestions from code review

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _automating-workflows/api/deprovision-workflow.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _automating-workflows/workflow-steps.md

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Melissa Vagi <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Added Flow Framework plugin to Vale

Signed-off-by: Fanit Kolchina <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* More editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

* Update _automating-workflows/api/get-workflow-status.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _automating-workflows/api/get-workflow-status.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Add note about provisioning

Signed-off-by: Fanit Kolchina <[email protected]>

* Update _automating-workflows/index.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Update _automating-workflows/workflow-steps.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* More editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

* Removed code font from headings

Signed-off-by: Fanit Kolchina <[email protected]>

* Add agent documentation links

Signed-off-by: Fanit Kolchina <[email protected]>

* Add experimental label and more links

Signed-off-by: Fanit Kolchina <[email protected]>

* Add sample templates link

Signed-off-by: Fanit Kolchina <[email protected]>

* Added a tracking issue to warning

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Owais Kazi <[email protected]>
Co-authored-by: Melissa Vagi <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
2024-02-07 18:44:49 -05:00

51 lines
1.8 KiB
Markdown

---
layout: default
title: Provision a workflow
parent: Workflow APIs
nav_order: 30
---
# Provision 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](https://github.com/opensearch-project/flow-framework/issues/475).
{: .warning}
Provisioning a workflow is a one-time setup process usually performed by a cluster administrator to create resources that will be used by end users.
The `workflows` template field may contain multiple workflows. The workflow with the `provision` key can be executed with this API. This API is also executed when the [Create or Update Workflow API]({{site.url}}{{site.baseurl}}/automating-workflows/api/create-workflow/) is called with the `provision` parameter set to `true`.
You can only provision a workflow if it has not yet been provisioned. Deprovision the workflow if you need to repeat provisioning.
{: .note}
## Path and HTTP methods
```json
POST /_plugins/_flow_framework/workflow/<workflow_id>/_provision
```
## Path parameters
The following table lists the available path parameters.
| Parameter | Data type | Description |
| :--- | :--- | :--- |
| `workflow_id` | String | The ID of the workflow to be provisioned. Required. |
#### Example request
```json
POST /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50/_provision
```
{% include copy-curl.html %}
#### Example response
OpenSearch responds with the same `workflow_id` that was used in the request:
```json
{
"workflow_id" : "8xL8bowB8y25Tqfenm50"
}
```
To obtain the provisioning status, query the [Get Workflow State API]({{site.url}}{{site.baseurl}}/automating-workflows/api/get-workflow-status/).