See Stacksync in action with a solution architect. Book a demo ↗
Workflows

Workflows

Delete workflow draft step

DELETE
/v1/workspaces/{workspace_id}/workflows/{workflow_id}/draft/steps/{step_id}

Remove one step from the latest draft with every edge touching it; a loop or try/catch step goes with the steps it holds. A trigger step is disconnected as the builder does, then the draft is saved; a draft saved since you read it is refused with 409.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

workflow_id*string

The workflow.

Formatuuid
step_id*string

The step, its workflow_module_instance_id in the workflow document.

Query Parameters

region*Regions

Region of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them

Value in"besg""usnv"
expected_last_modified_time?|

The last_modified_time of the draft you read; refused with 409 when it changed

Defaultnull
validate_only?Validate Only

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Defaultfalse

Response Body

OK

application/json
  1. response
workflow_id*Workflow Id
region*Regions
Value in"besg""usnv"
version*

A version without its document; step_ids lists its steps (workflow_module_instance_id)

triggers*array<>
deleted_step_ids*array<string>

The step deleted and, for a loop or try/catch step, the steps it held

Delete workflow draft step
curl -X DELETE 'https://api.stacksync.com/v1/workspaces/0/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/draft/steps/string?region=besg'
{  "workflow_id": "<workflow_id>",  "region": "besg",  "version": {    "workflow_version": "<workflow_version>",    "is_draft": false,    "is_deployed": false,    "last_modified_time": "<last_modified_time>",    "step_ids": [      "<step_ids>"    ]  },  "triggers": [    {      "step_id": "<step_id>",      "status": "succeeded",      "msg": "<msg>"    }  ],  "deleted_step_ids": [    "<deleted_step_ids>"  ]}