Workflow Definitions
Invoke Workflow Handler
POST
/
v1
/
workflow-definitions
/
{definition_id}
/
invoke
Invoke Workflow Handler
curl --request POST \
--url http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>"
}
'import requests
url = "http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke"
payload = { "idempotency_key": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({idempotency_key: '<string>'})
};
fetch('http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runner_type": "SELF_HOSTED",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"run_snapshot": {
"workflow_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_name": "<string>",
"runner_type": "SELF_HOSTED",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_run_duration_seconds": 123,
"sources": [
{
"path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"materialized_path": "<string>"
}
],
"instructions": [
{
"path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"materialized_path": "<string>"
}
],
"outputs": [
{
"path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"materialized_path": "<string>"
}
],
"template": {
"path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"materialized_path": "<string>"
}
},
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Path Parameters
Cookies
Body
application/json
Request body for invoking a workflow definition.
Optional key to prevent duplicate runs from retries
Maximum string length:
255Response
Successful Response
Workflow run response.
Runner that executes the workflow.
Available options:
SELF_HOSTED Lifecycle status of a workflow run.
Available options:
PENDING, RUNNING, COMPLETED, FAILED Frozen ABCD configuration captured at workflow trigger time.
Show child attributes
Show child attributes
⌘I
Invoke Workflow Handler
curl --request POST \
--url http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>"
}
'import requests
url = "http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke"
payload = { "idempotency_key": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({idempotency_key: '<string>'})
};
fetch('http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/workflow-definitions/{definition_id}/invoke")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runner_type": "SELF_HOSTED",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"run_snapshot": {
"workflow_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_name": "<string>",
"runner_type": "SELF_HOSTED",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_run_duration_seconds": 123,
"sources": [
{
"path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"materialized_path": "<string>"
}
],
"instructions": [
{
"path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"materialized_path": "<string>"
}
],
"outputs": [
{
"path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"materialized_path": "<string>"
}
],
"template": {
"path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"materialized_path": "<string>"
}
},
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}