Skip to content

Commit 76486a4

Browse files
dbwiddiskolchfa-awsnatebower
authored
Document use_case param for Create Workflow API, link to existing docs (#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]>
1 parent 39338d7 commit 76486a4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/vale/styles/Vocab/OpenSearch/Words/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ p\d{2}
102102
[Rr]eenable
103103
[Rr]eindex
104104
[Rr]eingest
105+
[Rr]eprovision(ed|ing)?
105106
[Rr]erank(er|ed|ing)?
106107
[Rr]epo
107108
[Rr]ewriter

_automating-configurations/api/create-workflow.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ PUT /_plugins/_flow_framework/workflow/<workflow_id>?reprovision=true
8484
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.
8585
{: .note}
8686

87+
You can create and provision a workflow using a [workflow template]({{site.url}}{{site.baseurl}}/automating-configurations/workflow-templates/) as follows:
88+
89+
```json
90+
POST /_plugins/_flow_framework/workflow?use_case=<use_case>&provision=true
91+
{
92+
"create_connector.credential.key" : "<YOUR API KEY>"
93+
}
94+
```
95+
{% include copy-curl.html %}
96+
8797
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`.
8898

8999
| Parameter | Data type | Description |
@@ -92,6 +102,7 @@ The following table lists the available query parameters. All query parameters a
92102
| `update_fields` | Boolean | Whether to update only the fields included in the request body. Default is `false`. |
93103
| `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`. |
94104
| `validation` | String | Whether to validate the workflow. Valid values are `all` (validate the template) and `none` (do not validate the template). Default is `all`. |
105+
| `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. |
95106
| 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). |
96107

97108
## Request fields
@@ -102,7 +113,7 @@ The following table lists the available request fields.
102113
|:--- |:--- |:--- |:--- |
103114
|`name` |String |Required |The name of the workflow. |
104115
|`description` |String |Optional |A description of the workflow. |
105-
|`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. |
116+
|`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. |
106117
|`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. |
107118
|`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`. |
108119

0 commit comments

Comments
 (0)