Skip to content

Commit

Permalink
Document use_case param for Create Workflow API, link to existing docs (
Browse files Browse the repository at this point in the history
opensearch-project#8171)

* Document use_case param for Create Workflow API, link to existing docs

Signed-off-by: Daniel Widdis <[email protected]>

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

Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

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

Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

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

Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

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

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

* Resolve merge conflicts

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

---------

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Co-authored-by: Fanit Kolchina <[email protected]>
  • Loading branch information
4 people authored Sep 11, 2024
1 parent 39338d7 commit 76486a4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/vale/styles/Vocab/OpenSearch/Words/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ p\d{2}
[Rr]eenable
[Rr]eindex
[Rr]eingest
[Rr]eprovision(ed|ing)?
[Rr]erank(er|ed|ing)?
[Rr]epo
[Rr]ewriter
Expand Down
13 changes: 12 additions & 1 deletion _automating-configurations/api/create-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ PUT /_plugins/_flow_framework/workflow/<workflow_id>?reprovision=true
You can add new steps to the workflow but cannot delete them. Only index setting, search pipeline, and ingest pipeline steps can currently be updated.
{: .note}

You can create and provision a workflow using a [workflow template]({{site.url}}{{site.baseurl}}/automating-configurations/workflow-templates/) as follows:

```json
POST /_plugins/_flow_framework/workflow?use_case=<use_case>&provision=true
{
"create_connector.credential.key" : "<YOUR API KEY>"
}
```
{% include copy-curl.html %}

The following table lists the available query parameters. All query parameters are optional. User-provided parameters are only allowed if the `provision` parameter is set to `true`.

| Parameter | Data type | Description |
Expand All @@ -92,6 +102,7 @@ The following table lists the available query parameters. All query parameters a
| `update_fields` | Boolean | Whether to update only the fields included in the request body. Default is `false`. |
| `reprovision` | Boolean | Whether to reprovision the entire template if it has already been provisioned. A complete template must be provided in the request body. Default is `false`. |
| `validation` | String | Whether to validate the workflow. Valid values are `all` (validate the template) and `none` (do not validate the template). Default is `all`. |
| `use_case` | String | The name of the [workflow template]({{site.url}}{{site.baseurl}}/automating-configurations/workflow-templates/#supported-workflow-templates) to use when creating the workflow. |
| User-provided substitution expressions | String | Parameters matching substitution expressions in the template. Only allowed if `provision` is set to `true`. Optional. If `provision` is set to `false`, you can pass these parameters in the [Provision Workflow API query parameters]({{site.url}}{{site.baseurl}}/automating-configurations/api/provision-workflow/#query-parameters). |

## Request fields
Expand All @@ -102,7 +113,7 @@ The following table lists the available request fields.
|:--- |:--- |:--- |:--- |
|`name` |String |Required |The name of the workflow. |
|`description` |String |Optional |A description of the workflow. |
|`use_case` |String |Optional | A use case, which can be used with the Search Workflow API to find related workflows. In the future, OpenSearch may provide some standard use cases to ease categorization, but currently you can use this field to specify custom values. |
|`use_case` |String |Optional | A user-provided use case, which can be used with the [Search Workflow API]({{site.url}}{{site.baseurl}}/automating-configurations/api/search-workflow/) to find related workflows. You can use this field to specify custom values. This is distinct from the `use_case` query parameter. |
|`version` |Object |Optional | A key-value map with two fields: `template`, which identifies the template version, and `compatibility`, which identifies a list of minimum required OpenSearch versions. |
|`workflows` |Object |Optional |A map of workflows. Presently, only the `provision` key is supported. The value for the workflow key is a key-value map that includes fields for `user_params` and lists of `nodes` and `edges`. |

Expand Down

0 comments on commit 76486a4

Please sign in to comment.