Update a workflow
curl --request PATCH \
--url https://api.langdock.com/workflows/v1/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"nodes": [
{}
],
"edges": [
{}
],
"patch": {},
"limits": {}
}
'import requests
url = "https://api.langdock.com/workflows/v1/update"
payload = {
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"nodes": [{}],
"edges": [{}],
"patch": {},
"limits": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflowId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
timezone: '<string>',
nodes: [{}],
edges: [{}],
patch: {},
limits: {}
})
};
fetch('https://api.langdock.com/workflows/v1/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.langdock.com/workflows/v1/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'timezone' => '<string>',
'nodes' => [
[
]
],
'edges' => [
[
]
],
'patch' => [
],
'limits' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.langdock.com/workflows/v1/update"
payload := strings.NewReader("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.langdock.com/workflows/v1/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/workflows/v1/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}"
response = http.request(request)
puts response.read_bodyWorkflow API
Workflow aktualisieren
Aktualisiere Metadaten oder den Entwurfsgraphen eines Workflows
PATCH
/
workflows
/
v1
/
update
Update a workflow
curl --request PATCH \
--url https://api.langdock.com/workflows/v1/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"nodes": [
{}
],
"edges": [
{}
],
"patch": {},
"limits": {}
}
'import requests
url = "https://api.langdock.com/workflows/v1/update"
payload = {
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"nodes": [{}],
"edges": [{}],
"patch": {},
"limits": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflowId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
timezone: '<string>',
nodes: [{}],
edges: [{}],
patch: {},
limits: {}
})
};
fetch('https://api.langdock.com/workflows/v1/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.langdock.com/workflows/v1/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'timezone' => '<string>',
'nodes' => [
[
]
],
'edges' => [
[
]
],
'patch' => [
],
'limits' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.langdock.com/workflows/v1/update"
payload := strings.NewReader("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.langdock.com/workflows/v1/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/workflows/v1/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}"
response = http.request(request)
puts response.read_bodyAktualisiert Metadaten oder den Entwurfsgraphen für einen Workflow, den der API-Key-User bearbeiten kann. Ein Update am Entwurf veröffentlicht keine neue Version.
Sende in einer Anfrage entweder Metadaten (inklusive
Um den Entwurfsgraphen zu ersetzen, sende
limits) oder ein Graph-Update. Mische sie nicht.
Basis-URL
https://api.langdock.com/workflows/v1/update
Dedicated DeploymentsErsetze
api.langdock.com durch <your-deployment-url>/api/public in allen Anfragen.Erforderliche Scopes
Dieser Endpoint erfordert denWORKFLOW_WRITE_API Scope (Workflow-Schreib-API) und Bearbeiterzugriff.
Parameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
workflowId | string | Ja | UUID des Workflows. |
name | string | Nein | Workflow-Name. Maximum: 60 Zeichen. |
description | string | Nein | Workflow-Beschreibung. Maximum: 500 Zeichen. |
status | string | Nein | ACTIVE oder INACTIVE. ACTIVE braucht eine veröffentlichte Version. Nutze INACTIVE, um einen laufenden Workflow zu pausieren. |
timezone | string | Nein | Gültige IANA-Zeitzone. Wird gespeichert, wenn status fehlt oder ACTIVE ist. Wird ignoriert, wenn status INACTIVE ist, damit eine Pause die Cron-Zeitzone nicht überschreibt. |
nodes | array | Nein | Vollständiger Ersatz der Entwurf-Nodes. Muss zusammen mit edges gesendet werden, nicht mit patch oder Metadaten. |
edges | array | Nein | Vollständiger Ersatz der Entwurf-Kanten. Muss zusammen mit nodes gesendet werden. |
patch | object | Nein | Inkrementelle Graph-Operationen statt eines vollständigen nodes- und edges-Ersatzes. Nicht zusammen mit nodes und edges oder mit Metadaten senden. |
limits | object | Nein | Ausführungslimits. Weggelassene Felder bleiben unverändert. Sende null auf einem Feld, um es zu leeren. Darf mit anderen Metadaten gesendet werden, nicht mit einem Graph-Update. |
nodes und edges. Für eine inkrementelle Graph-Änderung sende patch. Ein redigierter Secret-Wert aus Abrufen behält das gespeicherte Secret. Sende einen neuen, nicht leeren Wert, um ein Secret zu rotieren, oder null, um ein Secret-Feld zu leeren.
Beispiel
const axios = require("axios");
async function pauseWorkflow(workflowId) {
const response = await axios.patch(
"https://api.langdock.com/workflows/v1/update",
{
workflowId,
status: "INACTIVE"
},
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
}
);
console.log("Status:", response.data.workflow.status);
}
pauseWorkflow("550e8400-e29b-41d4-a716-446655440000");
Antwortformat
Erfolgreiche Antwort (200 OK)
{
status: "success";
message: "Workflow updated successfully";
workflow: object;
}
workflow entspricht dem Objekt in der Workflow API Übersicht.
Fehlerbehandlung
| Statuscode | Beschreibung |
|---|---|
| 400 | Ungültiger Body, gemischter Graph und Metadaten, nodes ohne edges, keine Felder, oder Aktivierung ohne veröffentlichte Version |
| 401 | Ungültiger oder fehlender API-Key |
| 403 | Fehlender WORKFLOW_WRITE_API Scope oder Bearbeiterzugriff. Ein fehlender Workflow, eine Vorlage oder ein Workflow in einem anderen Workspace gibt denselben Status zurück. Ein Graph-Update mit Meeting End ohne Meetings gibt MEETINGS_FEATURE_FLAG_DISABLED zurück. |
| 429 | Rate Limit überschritten |
| 500 | Interner Serverfehler |
Langdock blockiert bewusst Browser-basierte Anfragen, um deinen API-Schlüssel zu schützen und die Sicherheit deiner Anwendungen zu gewährleisten. Weitere Informationen findest du in unserem Guide zu Best Practices für API-Schlüssel.
Autorisierungen
API key as Bearer token. Format "Bearer YOUR_API_KEY"
Body
application/json
Maximum string length:
60Maximum string length:
500Verfügbare Optionen:
ACTIVE, INACTIVE Valid IANA timezone.
Incremental graph operations. Cannot be sent with nodes and edges or with metadata.
Execution caps. Omitted fields stay unchanged. Send null on a field to clear it.
Antwort
Workflow updated successfully
War diese Seite hilfreich?