Workflows
Edit a workflow draft node
Change a draft node’s name, description, position or machine-writable configuration.
PATCH
/
api
/
v3
/
workflows
/
{workflowId}
/
draft-nodes
/
{nodeId}
Edit a workflow draft node
curl --request PATCH \
--url https://api.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"config": {
"prompt": "<string>",
"timeout": 123,
"onTimeout": "<string>",
"maxOutputTokens": 123,
"includeUpstreamOutputs": [
"<string>"
],
"inputs": {},
"outputs": {},
"routingStrategy": "<string>",
"rules": [
{
"label": "<string>",
"condition": "<string>"
}
],
"routingPrompt": "<string>",
"routeOptions": [
{
"label": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"multiSelect": true,
"joinStrategy": "<string>",
"joinThreshold": 123,
"message": "<string>"
},
"clearFields": [],
"removeInputFields": [
"<string>"
]
}
'import requests
url = "https://api.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}"
payload = {
"name": "<string>",
"description": "<string>",
"config": {
"prompt": "<string>",
"timeout": 123,
"onTimeout": "<string>",
"maxOutputTokens": 123,
"includeUpstreamOutputs": ["<string>"],
"inputs": {},
"outputs": {},
"routingStrategy": "<string>",
"rules": [
{
"label": "<string>",
"condition": "<string>"
}
],
"routingPrompt": "<string>",
"routeOptions": [
{
"label": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"multiSelect": True,
"joinStrategy": "<string>",
"joinThreshold": 123,
"message": "<string>"
},
"clearFields": [],
"removeInputFields": ["<string>"]
}
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({
name: '<string>',
description: '<string>',
config: {
prompt: '<string>',
timeout: 123,
onTimeout: '<string>',
maxOutputTokens: 123,
includeUpstreamOutputs: ['<string>'],
inputs: {},
outputs: {},
routingStrategy: '<string>',
rules: [{label: '<string>', condition: '<string>'}],
routingPrompt: '<string>',
routeOptions: [{label: '<string>', description: '<string>', id: '<string>'}],
multiSelect: true,
joinStrategy: '<string>',
joinThreshold: 123,
message: '<string>'
},
clearFields: [],
removeInputFields: ['<string>']
})
};
fetch('https://api.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}', 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.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}",
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([
'name' => '<string>',
'description' => '<string>',
'config' => [
'prompt' => '<string>',
'timeout' => 123,
'onTimeout' => '<string>',
'maxOutputTokens' => 123,
'includeUpstreamOutputs' => [
'<string>'
],
'inputs' => [
],
'outputs' => [
],
'routingStrategy' => '<string>',
'rules' => [
[
'label' => '<string>',
'condition' => '<string>'
]
],
'routingPrompt' => '<string>',
'routeOptions' => [
[
'label' => '<string>',
'description' => '<string>',
'id' => '<string>'
]
],
'multiSelect' => true,
'joinStrategy' => '<string>',
'joinThreshold' => 123,
'message' => '<string>'
],
'clearFields' => [
],
'removeInputFields' => [
'<string>'
]
]),
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.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"prompt\": \"<string>\",\n \"timeout\": 123,\n \"onTimeout\": \"<string>\",\n \"maxOutputTokens\": 123,\n \"includeUpstreamOutputs\": [\n \"<string>\"\n ],\n \"inputs\": {},\n \"outputs\": {},\n \"routingStrategy\": \"<string>\",\n \"rules\": [\n {\n \"label\": \"<string>\",\n \"condition\": \"<string>\"\n }\n ],\n \"routingPrompt\": \"<string>\",\n \"routeOptions\": [\n {\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"multiSelect\": true,\n \"joinStrategy\": \"<string>\",\n \"joinThreshold\": 123,\n \"message\": \"<string>\"\n },\n \"clearFields\": [],\n \"removeInputFields\": [\n \"<string>\"\n ]\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.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"prompt\": \"<string>\",\n \"timeout\": 123,\n \"onTimeout\": \"<string>\",\n \"maxOutputTokens\": 123,\n \"includeUpstreamOutputs\": [\n \"<string>\"\n ],\n \"inputs\": {},\n \"outputs\": {},\n \"routingStrategy\": \"<string>\",\n \"rules\": [\n {\n \"label\": \"<string>\",\n \"condition\": \"<string>\"\n }\n ],\n \"routingPrompt\": \"<string>\",\n \"routeOptions\": [\n {\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"multiSelect\": true,\n \"joinStrategy\": \"<string>\",\n \"joinThreshold\": 123,\n \"message\": \"<string>\"\n },\n \"clearFields\": [],\n \"removeInputFields\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"prompt\": \"<string>\",\n \"timeout\": 123,\n \"onTimeout\": \"<string>\",\n \"maxOutputTokens\": 123,\n \"includeUpstreamOutputs\": [\n \"<string>\"\n ],\n \"inputs\": {},\n \"outputs\": {},\n \"routingStrategy\": \"<string>\",\n \"rules\": [\n {\n \"label\": \"<string>\",\n \"condition\": \"<string>\"\n }\n ],\n \"routingPrompt\": \"<string>\",\n \"routeOptions\": [\n {\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"multiSelect\": true,\n \"joinStrategy\": \"<string>\",\n \"joinThreshold\": 123,\n \"message\": \"<string>\"\n },\n \"clearFields\": [],\n \"removeInputFields\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflowId": "<string>",
"draftId": "<string>",
"node": {
"nodeId": "<string>",
"type": "produce",
"name": "<string>",
"position": {
"x": 123,
"y": 123
},
"config": {
"prompt": "<string>",
"timeout": 123,
"onTimeout": "<string>",
"maxOutputTokens": 123,
"tier": "nano",
"presentationHint": "approval",
"includeUpstreamOutputs": [
"<string>"
],
"inputs": {},
"outputs": {},
"outcomeRouting": {
"output": "<string>",
"exceptionValues": [
"<string>"
]
},
"routingStrategy": "<string>",
"rules": [
{
"label": "<string>",
"condition": "<string>"
}
],
"routingPrompt": "<string>",
"routeOptions": [
{
"label": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"multiSelect": true,
"joinStrategy": "<string>",
"joinThreshold": 123,
"publishMessageFormat": "structured",
"publishPresentation": {
"title": "<string>",
"summary": "<string>",
"status": {
"kind": "static",
"value": "info"
},
"facts": [
{
"label": "<string>",
"value": "<string>"
}
],
"warnings": [
"<string>"
],
"body": "<string>"
},
"message": "<string>"
},
"consoleOnlyConfig": [
"<string>"
],
"createdAt": 123,
"updatedAt": 123,
"logicalNodeId": "<string>",
"description": "<string>"
}
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "resource_missing",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "conflict",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unprocessable",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "internal_error",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.
v2 compatibility notes
PATCH /api/v2/workflows/updateDraftNode
Changes one node of the workflow’s editable draft through the same checks the Forge Console builder runs. The node’s logicalNodeId never changes.
Authentication
External App credential or platform API key. Requires permissionworkflows:write, and the caller must hold both workflows:read and workflows:write at the workflow’s home org unit. Any External App or platform API key with those grants may edit; who created the workflow lends no authority. The org unit a request acts from is not the workflow’s home.
Body
The node’s
nodeId from getDraftGraph.Fields to set. Each replaces the stored value.
inputs replaces the whole input map: omitting a stored input is refused unless removeInputFields names it.Fields to delete:
prompt, timeout, onTimeout, maxOutputTokens, presentationHint, outputs, outcomeRouting or inputs.name, description, position, config, clearFields or removeInputFields is required.
What a machine can change
A node’sconfig takes only the structure and content fields: prompt, timeout, onTimeout, maxOutputTokens, tier, presentationHint, includeUpstreamOutputs, inputs, outputs, outcomeRouting, routingStrategy, rules, routingPrompt, routeOptions, multiSelect, joinStrategy, joinThreshold, publishMessageFormat, publishPresentation and message.
Every field that names an agent, worker, person, role, recipient, channel, address, credential, tool, skill, procedure, model or sandbox stays Console-only: agentDefinitionId, agentVersion, pinnedToolContract, toolOverrides, estimatedCost, autoInjectCases, workerAssignment, syndicationTargets, slackChannel, escalationChannel, assignee, routingModel, routerAgentOverride, destination, apiEndpoint, channelId, emailTo, emailSubject, notifyChannels, notifyRecipients, notifyTitle, validation, sandbox, capabilityHints, pinnedSkillVersions, procedureId, procedureVersion, sourceStepId and credentialBindings. A body that names one answers 400, and a write never sets, clears or reads them. A produce node therefore needs a person to assign its agent or worker in the Console before the workflow can be published.
Responses
200 with:
The node as getDraftGraph returns it:
nodeId, logicalNodeId, type, name, description, position, config and consoleOnlyConfig.Errors
| Status | Code | When |
|---|---|---|
400 | bad_request | Malformed JSON, an unknown or Console-only key, a wrong type, an unknown clearFields entry, a blank name, or no change. Message: Invalid workflow draft graph body. |
403 | permission_denied | The credential’s scopes do not include workflows:write. |
404 | resource_missing | The workflow id is malformed, or the workflow is missing, trashed, has no home or draft, or the caller lacks workflows:read and workflows:write at its home: Workflow not found. |
404 | resource_missing | The node is malformed, missing, or not a node of this draft: Workflow draft node not found. |
409 | conflict | Another node in this draft already has the new name. |
422 | unprocessable | A graph rule refuses the change, for example an inputs map that silently drops a stored input; the message names the rule. |
409 | idempotency_result_unavailable | A keyed repeat whose recorded result cannot be disclosed now. |
500 | internal_error | Unexpected error. |
Retries
Send anIdempotency-Key header to retry safely. Within 24 hours, the same key and body return the recorded status and body, with Idempotency-Replayed: true, while the caller still holds workflows:write and can read the workflow. Otherwise the repeat answers 409 idempotency_result_unavailable and does not write again. A new key is a new write. Without a key, a retried create meets the node-name rule (409) or the one-edge-per-pair rule (422), and a retried delete answers 404. If an outcome is unknown, read getDraftGraph before acting again.Authorizations
BearerAuthPlatformApiKeyPersonalKey
Path Parameters
Body
application/json
⌘I
Edit a workflow draft node
curl --request PATCH \
--url https://api.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"config": {
"prompt": "<string>",
"timeout": 123,
"onTimeout": "<string>",
"maxOutputTokens": 123,
"includeUpstreamOutputs": [
"<string>"
],
"inputs": {},
"outputs": {},
"routingStrategy": "<string>",
"rules": [
{
"label": "<string>",
"condition": "<string>"
}
],
"routingPrompt": "<string>",
"routeOptions": [
{
"label": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"multiSelect": true,
"joinStrategy": "<string>",
"joinThreshold": 123,
"message": "<string>"
},
"clearFields": [],
"removeInputFields": [
"<string>"
]
}
'import requests
url = "https://api.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}"
payload = {
"name": "<string>",
"description": "<string>",
"config": {
"prompt": "<string>",
"timeout": 123,
"onTimeout": "<string>",
"maxOutputTokens": 123,
"includeUpstreamOutputs": ["<string>"],
"inputs": {},
"outputs": {},
"routingStrategy": "<string>",
"rules": [
{
"label": "<string>",
"condition": "<string>"
}
],
"routingPrompt": "<string>",
"routeOptions": [
{
"label": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"multiSelect": True,
"joinStrategy": "<string>",
"joinThreshold": 123,
"message": "<string>"
},
"clearFields": [],
"removeInputFields": ["<string>"]
}
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({
name: '<string>',
description: '<string>',
config: {
prompt: '<string>',
timeout: 123,
onTimeout: '<string>',
maxOutputTokens: 123,
includeUpstreamOutputs: ['<string>'],
inputs: {},
outputs: {},
routingStrategy: '<string>',
rules: [{label: '<string>', condition: '<string>'}],
routingPrompt: '<string>',
routeOptions: [{label: '<string>', description: '<string>', id: '<string>'}],
multiSelect: true,
joinStrategy: '<string>',
joinThreshold: 123,
message: '<string>'
},
clearFields: [],
removeInputFields: ['<string>']
})
};
fetch('https://api.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}', 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.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}",
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([
'name' => '<string>',
'description' => '<string>',
'config' => [
'prompt' => '<string>',
'timeout' => 123,
'onTimeout' => '<string>',
'maxOutputTokens' => 123,
'includeUpstreamOutputs' => [
'<string>'
],
'inputs' => [
],
'outputs' => [
],
'routingStrategy' => '<string>',
'rules' => [
[
'label' => '<string>',
'condition' => '<string>'
]
],
'routingPrompt' => '<string>',
'routeOptions' => [
[
'label' => '<string>',
'description' => '<string>',
'id' => '<string>'
]
],
'multiSelect' => true,
'joinStrategy' => '<string>',
'joinThreshold' => 123,
'message' => '<string>'
],
'clearFields' => [
],
'removeInputFields' => [
'<string>'
]
]),
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.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"prompt\": \"<string>\",\n \"timeout\": 123,\n \"onTimeout\": \"<string>\",\n \"maxOutputTokens\": 123,\n \"includeUpstreamOutputs\": [\n \"<string>\"\n ],\n \"inputs\": {},\n \"outputs\": {},\n \"routingStrategy\": \"<string>\",\n \"rules\": [\n {\n \"label\": \"<string>\",\n \"condition\": \"<string>\"\n }\n ],\n \"routingPrompt\": \"<string>\",\n \"routeOptions\": [\n {\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"multiSelect\": true,\n \"joinStrategy\": \"<string>\",\n \"joinThreshold\": 123,\n \"message\": \"<string>\"\n },\n \"clearFields\": [],\n \"removeInputFields\": [\n \"<string>\"\n ]\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.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"prompt\": \"<string>\",\n \"timeout\": 123,\n \"onTimeout\": \"<string>\",\n \"maxOutputTokens\": 123,\n \"includeUpstreamOutputs\": [\n \"<string>\"\n ],\n \"inputs\": {},\n \"outputs\": {},\n \"routingStrategy\": \"<string>\",\n \"rules\": [\n {\n \"label\": \"<string>\",\n \"condition\": \"<string>\"\n }\n ],\n \"routingPrompt\": \"<string>\",\n \"routeOptions\": [\n {\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"multiSelect\": true,\n \"joinStrategy\": \"<string>\",\n \"joinThreshold\": 123,\n \"message\": \"<string>\"\n },\n \"clearFields\": [],\n \"removeInputFields\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/workflows/{workflowId}/draft-nodes/{nodeId}")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"prompt\": \"<string>\",\n \"timeout\": 123,\n \"onTimeout\": \"<string>\",\n \"maxOutputTokens\": 123,\n \"includeUpstreamOutputs\": [\n \"<string>\"\n ],\n \"inputs\": {},\n \"outputs\": {},\n \"routingStrategy\": \"<string>\",\n \"rules\": [\n {\n \"label\": \"<string>\",\n \"condition\": \"<string>\"\n }\n ],\n \"routingPrompt\": \"<string>\",\n \"routeOptions\": [\n {\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\"\n }\n ],\n \"multiSelect\": true,\n \"joinStrategy\": \"<string>\",\n \"joinThreshold\": 123,\n \"message\": \"<string>\"\n },\n \"clearFields\": [],\n \"removeInputFields\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflowId": "<string>",
"draftId": "<string>",
"node": {
"nodeId": "<string>",
"type": "produce",
"name": "<string>",
"position": {
"x": 123,
"y": 123
},
"config": {
"prompt": "<string>",
"timeout": 123,
"onTimeout": "<string>",
"maxOutputTokens": 123,
"tier": "nano",
"presentationHint": "approval",
"includeUpstreamOutputs": [
"<string>"
],
"inputs": {},
"outputs": {},
"outcomeRouting": {
"output": "<string>",
"exceptionValues": [
"<string>"
]
},
"routingStrategy": "<string>",
"rules": [
{
"label": "<string>",
"condition": "<string>"
}
],
"routingPrompt": "<string>",
"routeOptions": [
{
"label": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"multiSelect": true,
"joinStrategy": "<string>",
"joinThreshold": 123,
"publishMessageFormat": "structured",
"publishPresentation": {
"title": "<string>",
"summary": "<string>",
"status": {
"kind": "static",
"value": "info"
},
"facts": [
{
"label": "<string>",
"value": "<string>"
}
],
"warnings": [
"<string>"
],
"body": "<string>"
},
"message": "<string>"
},
"consoleOnlyConfig": [
"<string>"
],
"createdAt": 123,
"updatedAt": 123,
"logicalNodeId": "<string>",
"description": "<string>"
}
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "resource_missing",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "conflict",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unprocessable",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "internal_error",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}
