Start Workflow Execution (Async)
Endpoint: POST /api/workflow/{name}
Starts a workflow execution asynchronously. This method returns immediately with the workflow ID without waiting for the workflow to be completed.
Path parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
name | The name of the workflow to be started. | string | Required. |
Query parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
version | The workflow version. If unspecified, the latest version will be used. | integer | Optional. |
correlationId | A unique identifier used to correlate the current workflow execution with other executions of the same workflow. | string | Optional. |
priority | Priority of the workflow execution. Supported values: 0-99. Default is 0, which means workflows are completed in a first-in-first-out order. | integer | Optional. |
Request body
Contains the workflow inputs. Format the request as an object containing key-value pairs.
Example
{
"someKey": "someValue",
"anotherKey": {}
}
Header parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
X-Idempotency-key | A unique, user-generated key to prevent duplicate workflow executions. Idempotency data is retained for the life of the workflow execution. | string | Optional. |
X-on-conflict | The idempotency strategy for handling duplicate requests. Supported values:
| string | Required if X-Idempotency-key is specified. |
Response
Returns the workflow ID of the started workflow.
Examples
Start a workflow
Request
curl -X 'POST' \
'https://<YOUR_CLUSTER>/api/workflow/compensationWorkflow?priority=0' \
-H 'accept: text/plain' \
-H 'X-Authorization: <TOKEN>' \
-d '{
"input1": "someValue"
}'
Response
c0933afc-d3f4-11ef-87b1-b2b27c52ebde