Skip to content

Commit

Permalink
Document optional clear_status query parameter for Delete Workflow API (
Browse files Browse the repository at this point in the history
#7268)

* Document optional clear_status query parameter for Delete Workflow API

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

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

Co-authored-by: Owais Kazi <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

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

Co-authored-by: Owais Kazi <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

* Address code review comments

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

* Address code review comments

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

---------

Signed-off-by: Daniel Widdis <[email protected]>
Co-authored-by: Owais Kazi <[email protected]>
  • Loading branch information
dbwiddis and owaiskazi19 authored Jun 12, 2024
1 parent f1ef9b4 commit f8e0fa5
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions _automating-configurations/api/delete-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ nav_order: 80

# Delete a workflow

When you no longer need a workflow template, you can delete it by calling the Delete Workflow API.
When you no longer need a workflow template, you can delete it by calling the Delete Workflow API.

Note that deleting a workflow only deletes the stored template but does not deprovision its resources.
Note that deleting a workflow only deletes the stored template---it does not deprovision its resources.

When a workflow is deleted, its corresponding status (returned by the [Workflow State API]({{site.url}}{{site.baseurl}}/automating-configurations/api/get-workflow-status/)) is also deleted unless either the provisioning status is `IN_PROGRESS` or resources have been provisioned.

## Path and HTTP methods

Expand All @@ -25,13 +27,26 @@ The following table lists the available path parameters.
| :--- | :--- | :--- |
| `workflow_id` | String | The ID of the workflow to be retrieved. Required. |

## Query parameters

The following table lists the available query parameters. All query parameters are optional.

| Parameter | Data type | Description |
| :--- | :--- | :--- |
| `clear_status` | Boolean | Determines whether to delete the workflow state (without deprovisioning resources) after deleting the template. OpenSearch deletes the workflow state only if the provisioning status is not `IN_PROGRESS`. Default is `false`. |

#### Example request

```
```json
DELETE /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50
```
{% include copy-curl.html %}

```json
DELETE /_plugins/_flow_framework/workflow/8xL8bowB8y25Tqfenm50?clear_status=true
```
{% include copy-curl.html %}

#### Example response

If the workflow exists, a delete response contains the status of the deletion, where the `result` field is set to `deleted` on success or `not_found` if the workflow does not exist (it may have already been deleted):
Expand All @@ -50,4 +65,4 @@ If the workflow exists, a delete response contains the status of the deletion, w
"_seq_no": 2,
"_primary_term": 1
}
```
```

0 comments on commit f8e0fa5

Please sign in to comment.