Skip to content

Commit

Permalink
Document reprovision param for Update Workflow API (#8172)
Browse files Browse the repository at this point in the history
* Document reprovision param for Update Workflow API

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]>

---------

Signed-off-by: Daniel Widdis <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
  • Loading branch information
3 people authored Sep 11, 2024
1 parent cdf4985 commit f44deb2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion _automating-configurations/api/create-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ POST /_plugins/_flow_framework/workflow?validation=none
```
{% include copy-curl.html %}

You cannot update a full workflow once it has been provisioned, but you can update fields other than the `workflows` field, such as `name` and `description`:
In a workflow that has not been provisioned, you can update fields other than the `workflows` field. For example, you can update the `name` and `description` fields as follows:

```json
PUT /_plugins/_flow_framework/workflow/<workflow_id>?update_fields=true
Expand All @@ -72,12 +72,25 @@ PUT /_plugins/_flow_framework/workflow/<workflow_id>?update_fields=true
You cannot specify both the `provision` and `update_fields` parameters at the same time.
{: .note}

If a workflow has been provisioned, you can update and reprovision the full template:

```json
PUT /_plugins/_flow_framework/workflow/<workflow_id>?reprovision=true
{
<updated complete template>
}
```

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}

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 |
| :--- | :--- | :--- |
| `provision` | Boolean | Whether to provision the workflow as part of the request. Default is `false`. |
| `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`. |
| 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). |

Expand Down

0 comments on commit f44deb2

Please sign in to comment.