Workflows
Re-pin procedure nodes of a draft
Re-pin the listed procedure nodes of one workflow’s draft to a procedure version.
POST
/
api
/
v3
/
workflows
/
{workflowId}
/
repin-procedure
Re-pin procedure nodes of a draft
curl --request POST \
--url https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nodeIds": [
"<string>"
],
"procedureId": "<string>",
"version": "<string>",
"acceptedRepairs": [
{
"consumerNodeId": "<string>",
"input": "<string>",
"output": "<string>",
"suggestedTo": "<string>"
}
]
}
'import requests
url = "https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure"
payload = {
"nodeIds": ["<string>"],
"procedureId": "<string>",
"version": "<string>",
"acceptedRepairs": [
{
"consumerNodeId": "<string>",
"input": "<string>",
"output": "<string>",
"suggestedTo": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
nodeIds: ['<string>'],
procedureId: '<string>',
version: '<string>',
acceptedRepairs: [
{
consumerNodeId: '<string>',
input: '<string>',
output: '<string>',
suggestedTo: '<string>'
}
]
})
};
fetch('https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure', 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}/repin-procedure",
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([
'nodeIds' => [
'<string>'
],
'procedureId' => '<string>',
'version' => '<string>',
'acceptedRepairs' => [
[
'consumerNodeId' => '<string>',
'input' => '<string>',
'output' => '<string>',
'suggestedTo' => '<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}/repin-procedure"
payload := strings.NewReader("{\n \"nodeIds\": [\n \"<string>\"\n ],\n \"procedureId\": \"<string>\",\n \"version\": \"<string>\",\n \"acceptedRepairs\": [\n {\n \"consumerNodeId\": \"<string>\",\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"suggestedTo\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nodeIds\": [\n \"<string>\"\n ],\n \"procedureId\": \"<string>\",\n \"version\": \"<string>\",\n \"acceptedRepairs\": [\n {\n \"consumerNodeId\": \"<string>\",\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"suggestedTo\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nodeIds\": [\n \"<string>\"\n ],\n \"procedureId\": \"<string>\",\n \"version\": \"<string>\",\n \"acceptedRepairs\": [\n {\n \"consumerNodeId\": \"<string>\",\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"suggestedTo\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflowId": "<string>",
"draftId": "<string>",
"repinned": 123,
"skipped": [
{
"nodeId": "<string>",
"reason": "<string>"
}
],
"skippedStale": [
{
"nodeId": "<string>",
"reason": "<string>"
}
],
"repaired": [
{
"consumerNodeId": "<string>",
"consumerNodeName": "<string>",
"input": "<string>",
"output": "<string>",
"repairedTo": "<string>",
"suggestedTo": "<string>",
"reason": "<string>"
}
],
"dropped": [
{
"consumerNodeId": "<string>",
"consumerNodeName": "<string>",
"input": "<string>",
"output": "<string>",
"repairedTo": "<string>",
"suggestedTo": "<string>",
"reason": "<string>"
}
],
"consumerWalkSkipped": 123,
"unattributed": 123
},
"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
POST /api/v2/workflows/repinProcedure
The API twin of the Console’s bulk re-pin. Each node’s inputs and outputs re-hydrate from the new version. A renamed output is repaired only where you accept the preview’s suggestion in acceptedRepairs; any other binding the new version cannot satisfy is cut and reported in dropped. A node deleted, re-pointed at another procedure or already at the version since the preview is skipped as stale (skippedStale); a node whose re-pin failed is in skipped with its reason. consumerWalkSkipped counts nodes whose downstream walk did not run: their bindings are unknown, and the publish validator is the remaining check.
Authentication
Personal key, External App credential or platform API key. Requires permissionworkflows:write, and workflows:write and workflows:read held at the workflow’s home org unit. Every node must belong to that workflow’s draft.
Headers
Optional. A same-key retry within 24 hours returns the recorded answer without re-pinning again, only while you may still read the workflow it names; otherwise
409 idempotency_result_unavailable. The same key with a different body is 422. See Idempotency.Body
Responses
200 with data.workflowId, data.draftId, data.repinned, data.skipped, data.skippedStale, data.repaired, data.dropped, data.consumerWalkSkipped and data.unattributed.
Errors
| Status | Code | When |
|---|---|---|
400 | bad_request | The body is malformed, a field is unknown, or nodeIds is empty or over 50. |
403 | permission_denied | The credential’s scopes do not include workflows:write. |
404 | resource_missing | ”Workflow not found”: the workflow is missing, trashed or not writable by you, or a node is not in its draft. |
Example
curl -X POST "$FORGE_BASE/api/v2/workflows/repinProcedure" \
-H "Authorization: Bearer $FORGE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: repin-invoice-2-1" \
-d '{"id":"workflows:abc","nodeIds":["workflowGraphNodes:n1"],"procedureId":"invoice-extract","version":"2.1.0"}'
Authorizations
BearerAuthPlatformApiKeyPersonalKey
Headers
Path Parameters
Body
application/json
⌘I
Re-pin procedure nodes of a draft
curl --request POST \
--url https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nodeIds": [
"<string>"
],
"procedureId": "<string>",
"version": "<string>",
"acceptedRepairs": [
{
"consumerNodeId": "<string>",
"input": "<string>",
"output": "<string>",
"suggestedTo": "<string>"
}
]
}
'import requests
url = "https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure"
payload = {
"nodeIds": ["<string>"],
"procedureId": "<string>",
"version": "<string>",
"acceptedRepairs": [
{
"consumerNodeId": "<string>",
"input": "<string>",
"output": "<string>",
"suggestedTo": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
nodeIds: ['<string>'],
procedureId: '<string>',
version: '<string>',
acceptedRepairs: [
{
consumerNodeId: '<string>',
input: '<string>',
output: '<string>',
suggestedTo: '<string>'
}
]
})
};
fetch('https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure', 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}/repin-procedure",
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([
'nodeIds' => [
'<string>'
],
'procedureId' => '<string>',
'version' => '<string>',
'acceptedRepairs' => [
[
'consumerNodeId' => '<string>',
'input' => '<string>',
'output' => '<string>',
'suggestedTo' => '<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}/repin-procedure"
payload := strings.NewReader("{\n \"nodeIds\": [\n \"<string>\"\n ],\n \"procedureId\": \"<string>\",\n \"version\": \"<string>\",\n \"acceptedRepairs\": [\n {\n \"consumerNodeId\": \"<string>\",\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"suggestedTo\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nodeIds\": [\n \"<string>\"\n ],\n \"procedureId\": \"<string>\",\n \"version\": \"<string>\",\n \"acceptedRepairs\": [\n {\n \"consumerNodeId\": \"<string>\",\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"suggestedTo\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/workflows/{workflowId}/repin-procedure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nodeIds\": [\n \"<string>\"\n ],\n \"procedureId\": \"<string>\",\n \"version\": \"<string>\",\n \"acceptedRepairs\": [\n {\n \"consumerNodeId\": \"<string>\",\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"suggestedTo\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflowId": "<string>",
"draftId": "<string>",
"repinned": 123,
"skipped": [
{
"nodeId": "<string>",
"reason": "<string>"
}
],
"skippedStale": [
{
"nodeId": "<string>",
"reason": "<string>"
}
],
"repaired": [
{
"consumerNodeId": "<string>",
"consumerNodeName": "<string>",
"input": "<string>",
"output": "<string>",
"repairedTo": "<string>",
"suggestedTo": "<string>",
"reason": "<string>"
}
],
"dropped": [
{
"consumerNodeId": "<string>",
"consumerNodeName": "<string>",
"input": "<string>",
"output": "<string>",
"repairedTo": "<string>",
"suggestedTo": "<string>",
"reason": "<string>"
}
],
"consumerWalkSkipped": 123,
"unattributed": 123
},
"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
}
}
