You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _automating-configurations/api/create-workflow.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,16 @@ PUT /_plugins/_flow_framework/workflow/<workflow_id>?reprovision=true
84
84
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.
85
85
{: .note}
86
86
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
+
87
97
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`.
88
98
89
99
| Parameter | Data type | Description |
@@ -92,6 +102,7 @@ The following table lists the available query parameters. All query parameters a
92
102
|`update_fields`| Boolean | Whether to update only the fields included in the request body. Default is `false`. |
93
103
|`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`. |
94
104
|`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. |
95
106
| 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). |
96
107
97
108
## Request fields
@@ -102,7 +113,7 @@ The following table lists the available request fields.
102
113
|:--- |:--- |:--- |:--- |
103
114
|`name`|String |Required |The name of the workflow. |
104
115
|`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. |
106
117
|`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. |
107
118
|`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`. |
0 commit comments