Workflow Definitions
Update Workflow Definition Handler
PUT
/
v1
/
workflow-definitions
/
{definition_id}
Update Workflow Definition Handler
curl --request PUT \
--url http://localhost:8000/v1/workflow-definitions/{definition_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"runner_type": "SELF_HOSTED",
"source_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"instruction_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"output_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"description": "<string>",
"runner_config": {
"url": "<string>",
"webhook_secret": "<string>"
},
"max_run_duration_seconds": 300,
"template_path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true
}
'import requests
url = "http://localhost:8000/v1/workflow-definitions/{definition_id}"
payload = {
"name": "<string>",
"runner_type": "SELF_HOSTED",
"source_path_part_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"instruction_path_part_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"output_path_part_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"description": "<string>",
"runner_config": {
"url": "<string>",
"webhook_secret": "<string>"
},
"max_run_duration_seconds": 300,
"template_path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
runner_type: 'SELF_HOSTED',
source_path_part_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
instruction_path_part_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
output_path_part_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
description: '<string>',
runner_config: {url: '<string>', webhook_secret: '<string>'},
max_run_duration_seconds: 300,
template_path_part_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_active: true
})
};
fetch('http://localhost:8000/v1/workflow-definitions/{definition_id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'runner_type' => 'SELF_HOSTED',
'source_path_part_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'instruction_path_part_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'output_path_part_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'description' => '<string>',
'runner_config' => [
'url' => '<string>',
'webhook_secret' => '<string>'
],
'max_run_duration_seconds' => 300,
'template_path_part_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'is_active' => true
]),
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}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"runner_type\": \"SELF_HOSTED\",\n \"source_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"instruction_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"output_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"description\": \"<string>\",\n \"runner_config\": {\n \"url\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n },\n \"max_run_duration_seconds\": 300,\n \"template_path_part_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:8000/v1/workflow-definitions/{definition_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"runner_type\": \"SELF_HOSTED\",\n \"source_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"instruction_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"output_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"description\": \"<string>\",\n \"runner_config\": {\n \"url\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n },\n \"max_run_duration_seconds\": 300,\n \"template_path_part_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/workflow-definitions/{definition_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"runner_type\": \"SELF_HOSTED\",\n \"source_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"instruction_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"output_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"description\": \"<string>\",\n \"runner_config\": {\n \"url\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n },\n \"max_run_duration_seconds\": 300,\n \"template_path_part_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"runner_type": "SELF_HOSTED",
"runner_config": {
"url": "<string>"
},
"max_run_duration_seconds": 123,
"source_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"instruction_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"output_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"template_path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"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
Full replacement (PUT semantics). All fields are required.
Maximum string length:
255Runner that executes the workflow.
Available options:
SELF_HOSTED Required array length:
1 - 20 elementsRequired array length:
1 - 20 elementsRequired array length:
1 - 20 elementsConfiguration for self-hosted workflow runner.
Show child attributes
Show child attributes
Required range:
60 <= x <= 86400Response
Successful Response
Workflow definition response.
Runner that executes the workflow.
Available options:
SELF_HOSTED Response-safe version of runner config — excludes webhook_secret.
Show child attributes
Show child attributes
⌘I
Update Workflow Definition Handler
curl --request PUT \
--url http://localhost:8000/v1/workflow-definitions/{definition_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"runner_type": "SELF_HOSTED",
"source_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"instruction_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"output_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"description": "<string>",
"runner_config": {
"url": "<string>",
"webhook_secret": "<string>"
},
"max_run_duration_seconds": 300,
"template_path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true
}
'import requests
url = "http://localhost:8000/v1/workflow-definitions/{definition_id}"
payload = {
"name": "<string>",
"runner_type": "SELF_HOSTED",
"source_path_part_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"instruction_path_part_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"output_path_part_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"description": "<string>",
"runner_config": {
"url": "<string>",
"webhook_secret": "<string>"
},
"max_run_duration_seconds": 300,
"template_path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
runner_type: 'SELF_HOSTED',
source_path_part_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
instruction_path_part_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
output_path_part_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
description: '<string>',
runner_config: {url: '<string>', webhook_secret: '<string>'},
max_run_duration_seconds: 300,
template_path_part_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_active: true
})
};
fetch('http://localhost:8000/v1/workflow-definitions/{definition_id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'runner_type' => 'SELF_HOSTED',
'source_path_part_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'instruction_path_part_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'output_path_part_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'description' => '<string>',
'runner_config' => [
'url' => '<string>',
'webhook_secret' => '<string>'
],
'max_run_duration_seconds' => 300,
'template_path_part_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'is_active' => true
]),
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}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"runner_type\": \"SELF_HOSTED\",\n \"source_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"instruction_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"output_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"description\": \"<string>\",\n \"runner_config\": {\n \"url\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n },\n \"max_run_duration_seconds\": 300,\n \"template_path_part_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:8000/v1/workflow-definitions/{definition_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"runner_type\": \"SELF_HOSTED\",\n \"source_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"instruction_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"output_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"description\": \"<string>\",\n \"runner_config\": {\n \"url\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n },\n \"max_run_duration_seconds\": 300,\n \"template_path_part_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/workflow-definitions/{definition_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"runner_type\": \"SELF_HOSTED\",\n \"source_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"instruction_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"output_path_part_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"description\": \"<string>\",\n \"runner_config\": {\n \"url\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n },\n \"max_run_duration_seconds\": 300,\n \"template_path_part_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"runner_type": "SELF_HOSTED",
"runner_config": {
"url": "<string>"
},
"max_run_duration_seconds": 123,
"source_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"instruction_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"output_path_part_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"template_path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}