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

Workflows

Update workflow options

PATCH
/v1/workspaces/{workspace_id}/workflows/{workflow_id}/options

Merge options (the builder's canvas settings) into a version; a deployed version gets a new draft. Answers the latest version without its document.

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

Query Parameters

region*Regions

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

Value in"besg""usnv"

Request Body

application/json
  1. body
version*Version

The version whose options change; a deployed version gets a new draft

options*

The builder's canvas settings, merged over the stored ones

Response Body

OK

application/json
  1. response

A version of a workflow, as the documented "Get workflow" answers it; workflow_schema is the workflow document

workflow_id*Workflow Id
workflow_version*Workflow Version
workflow_status*Workflow Status
is_draft*Is Draft
is_deployed*Is Deployed
workflow_schema?|
Defaultnull
options?|
Defaultnull
created_by*Created By
created_time*Created Time
last_modified_by*Last Modified By
last_modified_time*Last Modified Time
Update workflow options
curl -X PATCH 'https://api.stacksync.com/v1/workspaces/0/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/options?region=besg' \  -H 'Content-Type: application/json' \  -d '{  "version": "<version>",  "options": {}}'
{  "workflow_id": "<workflow_id>",  "workflow_version": "<workflow_version>",  "workflow_status": "<workflow_status>",  "is_draft": false,  "is_deployed": false,  "workflow_schema": {    "workflow_execution_timeout": 300,    "workflow_module_execution_timeout": 300,    "return_workflow_module_instance_ids": [      "<return_workflow_module_instance_ids>"    ],    "modules": [      {        "name": "<name>",        "workflow_module_instance_id": "<workflow_module_instance_id>",        "module_id": "<module_id>",        "description": "<description>",        "properties": {},        "connections": [],        "module_options": {          "patches": {},          "layout": {            "group_module_instance_id": "<group_module_instance_id>"          },          "enable_error_handling": false,          "workflow_module_execution_timeout": 0        },        "error_handling_strategy": {          "conditions": [],          "else_condition": {            "retry_count": 0,            "retry_interval": 0          }        }      }    ],    "edges": [      {        "source": {          "handle_id": "<handle_id>",          "workflow_module_instance_id": "<workflow_module_instance_id>"        },        "target": {          "handle_id": "<handle_id>",          "workflow_module_instance_id": "<workflow_module_instance_id>"        },        "edge_id": "<edge_id>"      }    ]  },  "options": {},  "created_by": 0,  "created_time": "<created_time>",  "last_modified_by": 0,  "last_modified_time": "<last_modified_time>"}