curl --request POST \
--url http://localhost:3001/workflow/run \
--header 'Content-Type: application/json' \
--data '
{
"workflowName": "<string>",
"input": "<unknown>",
"workflowId": "<string>",
"catalog": "<string>",
"taskQueue": "<string>",
"timeout": 123
}
'import requests
url = "http://localhost:3001/workflow/run"
payload = {
"workflowName": "<string>",
"input": "<unknown>",
"workflowId": "<string>",
"catalog": "<string>",
"taskQueue": "<string>",
"timeout": 123
}
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({
workflowName: '<string>',
input: '<unknown>',
workflowId: '<string>',
catalog: '<string>',
taskQueue: '<string>',
timeout: 123
})
};
fetch('http://localhost:3001/workflow/run', 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 => "3001",
CURLOPT_URL => "http://localhost:3001/workflow/run",
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([
'workflowName' => '<string>',
'input' => '<unknown>',
'workflowId' => '<string>',
'catalog' => '<string>',
'taskQueue' => '<string>',
'timeout' => 123
]),
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:3001/workflow/run"
payload := strings.NewReader("{\n \"workflowName\": \"<string>\",\n \"input\": \"<unknown>\",\n \"workflowId\": \"<string>\",\n \"catalog\": \"<string>\",\n \"taskQueue\": \"<string>\",\n \"timeout\": 123\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:3001/workflow/run")
.header("Content-Type", "application/json")
.body("{\n \"workflowName\": \"<string>\",\n \"input\": \"<unknown>\",\n \"workflowId\": \"<string>\",\n \"catalog\": \"<string>\",\n \"taskQueue\": \"<string>\",\n \"timeout\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/workflow/run")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowName\": \"<string>\",\n \"input\": \"<unknown>\",\n \"workflowId\": \"<string>\",\n \"catalog\": \"<string>\",\n \"taskQueue\": \"<string>\",\n \"timeout\": 123\n}"
response = http.request(request)
puts response.read_body{
"workflowId": "<string>",
"runId": "<string>",
"input": "<unknown>",
"output": "<unknown>",
"trace": {
"destinations": {
"local": "<string>",
"remote": "<string>"
}
},
"error": "<string>",
"errorDetails": {
"message": "<string>",
"name": "<string>",
"retryable": true,
"activityId": "<string>",
"cause": {}
}
}{
"error": "ValidationError",
"message": "Invalid Payload",
"issues": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}Execute a workflow synchronously
Executes a workflow and waits for it to complete before returning the result
curl --request POST \
--url http://localhost:3001/workflow/run \
--header 'Content-Type: application/json' \
--data '
{
"workflowName": "<string>",
"input": "<unknown>",
"workflowId": "<string>",
"catalog": "<string>",
"taskQueue": "<string>",
"timeout": 123
}
'import requests
url = "http://localhost:3001/workflow/run"
payload = {
"workflowName": "<string>",
"input": "<unknown>",
"workflowId": "<string>",
"catalog": "<string>",
"taskQueue": "<string>",
"timeout": 123
}
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({
workflowName: '<string>',
input: '<unknown>',
workflowId: '<string>',
catalog: '<string>',
taskQueue: '<string>',
timeout: 123
})
};
fetch('http://localhost:3001/workflow/run', 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 => "3001",
CURLOPT_URL => "http://localhost:3001/workflow/run",
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([
'workflowName' => '<string>',
'input' => '<unknown>',
'workflowId' => '<string>',
'catalog' => '<string>',
'taskQueue' => '<string>',
'timeout' => 123
]),
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:3001/workflow/run"
payload := strings.NewReader("{\n \"workflowName\": \"<string>\",\n \"input\": \"<unknown>\",\n \"workflowId\": \"<string>\",\n \"catalog\": \"<string>\",\n \"taskQueue\": \"<string>\",\n \"timeout\": 123\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:3001/workflow/run")
.header("Content-Type", "application/json")
.body("{\n \"workflowName\": \"<string>\",\n \"input\": \"<unknown>\",\n \"workflowId\": \"<string>\",\n \"catalog\": \"<string>\",\n \"taskQueue\": \"<string>\",\n \"timeout\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/workflow/run")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowName\": \"<string>\",\n \"input\": \"<unknown>\",\n \"workflowId\": \"<string>\",\n \"catalog\": \"<string>\",\n \"taskQueue\": \"<string>\",\n \"timeout\": 123\n}"
response = http.request(request)
puts response.read_body{
"workflowId": "<string>",
"runId": "<string>",
"input": "<unknown>",
"output": "<unknown>",
"trace": {
"destinations": {
"local": "<string>",
"remote": "<string>"
}
},
"error": "<string>",
"errorDetails": {
"message": "<string>",
"name": "<string>",
"retryable": true,
"activityId": "<string>",
"cause": {}
}
}{
"error": "ValidationError",
"message": "Invalid Payload",
"issues": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}Body
The name of the workflow to execute
The payload to send to the workflow
(Optional) The workflowId to use. Must be unique
The catalog (Temporal task queue) to route the execution to. Falls back to the default catalog.
Deprecated alias for catalog. If both are sent, catalog wins.
(Optional) The max time to wait for the execution, defaults to 30s
Response
The workflow result
The workflow execution id
The specific run id for this execution
The original input passed to the workflow, null if unavailable
The result of workflow, null if workflow failed
An object with information about the trace generated by the execution
Show child attributes
Show child attributes
The workflow execution status
completed, failed, canceled, terminated, timed_out, continued_as_new Error message if workflow failed, null otherwise
Structured failure details if the workflow failed, null otherwise
Show child attributes
Show child attributes