Diff two workflow revisions
Compute a two-layer diff between two revisions of the same workflow.
Returns:
source_diff: deterministic diff of the authored config columns (always present, always exact).graph_diff: projected behavior diff over the compiled graphs (null when either side is uncompiled or the stored graph is unparseable).fidelity:"exact"|"approximate"|"source_only".
GET
/
v1
/
workflows
/
{workflow_id}
/
revisions
/
diff
Diff two workflow revisions
curl --request GET \
--url https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff \
--header 'x-api-key: <api-key>'import requests
url = "https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff', 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-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"base": {
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provenance": "compiled"
},
"target": {
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provenance": "compiled"
},
"fidelity": "exact",
"source_diff": {
"instructions": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"config": {
"added": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"removed": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"changed": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
},
"policies": {
"added": [
"<string>"
],
"removed": [
"<string>"
]
},
"tool_input_defaults": {
"added": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"removed": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"changed": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
},
"model_settings": {
"analyzer": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"router": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
}
},
"graph_diff": {
"summary": {
"nodes_added": 0,
"nodes_removed": 0,
"nodes_changed": 0,
"edges_added": 0,
"edges_removed": 0,
"edges_changed": 0,
"context_vars_added": 0,
"context_vars_removed": 0,
"context_vars_changed": 0
},
"graph_meta": {
"persona": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
}
},
"nodes": {
"added": [
{
"id": "<string>",
"kind": "agent",
"is_entry": false,
"name": "<string>",
"instructions": "<string>",
"required_writes": [
"<string>"
],
"writes": [
"<string>"
],
"done_when_readable": "<string>",
"tools": [
{
"canonical_key": "<string>",
"display_name": "<string>",
"produces_variables": [
"<string>"
]
}
],
"knowledge_bases": [
{
"kb_id": "<string>",
"display_name": "<string>",
"clearance_level": 123
}
],
"allow_jump_back": false,
"jump_back_target": false,
"jump_back_when": "<string>",
"description": "<string>",
"failure_message": "<string>",
"steps": [
{
"id": "<string>",
"kind": "speak",
"text": "<string>",
"tool_display_name": "<string>",
"knowledge_base_names": [
"<string>"
]
}
],
"result_write_names": [
"<string>"
],
"static_text": "<string>",
"voice_config": {
"targets": [
{
"label": "<string>",
"when_to_use": "<string>"
}
],
"connecting_text": "<string>",
"mode": "cold",
"max_retries": 1,
"retry_text": "<string>"
},
"on_failure": "<string>",
"condition_readable": "<string>",
"approver_role": "<string>",
"suspend_message": "<string>",
"timeout_seconds": 123,
"on_approve": "<string>",
"on_deny": "<string>",
"component_workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pinned_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input_bindings": [
{}
]
}
],
"removed": [
{
"id": "<string>",
"kind": "agent",
"is_entry": false,
"name": "<string>",
"instructions": "<string>",
"required_writes": [
"<string>"
],
"writes": [
"<string>"
],
"done_when_readable": "<string>",
"tools": [
{
"canonical_key": "<string>",
"display_name": "<string>",
"produces_variables": [
"<string>"
]
}
],
"knowledge_bases": [
{
"kb_id": "<string>",
"display_name": "<string>",
"clearance_level": 123
}
],
"allow_jump_back": false,
"jump_back_target": false,
"jump_back_when": "<string>",
"description": "<string>",
"failure_message": "<string>",
"steps": [
{
"id": "<string>",
"kind": "speak",
"text": "<string>",
"tool_display_name": "<string>",
"knowledge_base_names": [
"<string>"
]
}
],
"result_write_names": [
"<string>"
],
"static_text": "<string>",
"voice_config": {
"targets": [
{
"label": "<string>",
"when_to_use": "<string>"
}
],
"connecting_text": "<string>",
"mode": "cold",
"max_retries": 1,
"retry_text": "<string>"
},
"on_failure": "<string>",
"condition_readable": "<string>",
"approver_role": "<string>",
"suspend_message": "<string>",
"timeout_seconds": 123,
"on_approve": "<string>",
"on_deny": "<string>",
"component_workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pinned_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input_bindings": [
{}
]
}
],
"changed": [
{
"id": "<string>",
"kind": "agent",
"changes": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
}
]
},
"edges": {
"added": [
{
"from_node": "<string>",
"to_node": "<string>",
"condition_readable": "<string>",
"is_failure_path": false
}
],
"removed": [
{
"from_node": "<string>",
"to_node": "<string>",
"condition_readable": "<string>",
"is_failure_path": false
}
],
"changed": [
{
"from_node": "<string>",
"to_node": "<string>",
"changes": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
}
]
},
"context_variables": {
"added": [
{
"name": "<string>",
"type": "<string>",
"source": "<string>",
"enum_values": [
"<string>"
],
"reask_cap": 123,
"description": "<string>"
}
],
"removed": [
{
"name": "<string>",
"type": "<string>",
"source": "<string>",
"enum_values": [
"<string>"
],
"reask_cap": 123,
"description": "<string>"
}
],
"changed": [
{
"name": "<string>",
"changes": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
}
]
}
},
"component_update_only": false
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Response
Successful Response
Top-level response returned by GET /workflows/{id}/revisions/diff.
Metadata about one side of the diff (base or target).
Show child attributes
Show child attributes
Metadata about one side of the diff (base or target).
Show child attributes
Show child attributes
Available options:
exact, approximate, source_only Source-layer diff — exactly what the author edited (authored config columns).
Always present and always deterministic regardless of graph provenance.
Show child attributes
Show child attributes
Full behavior diff — projected graph comparison.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Diff two workflow revisions
curl --request GET \
--url https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff \
--header 'x-api-key: <api-key>'import requests
url = "https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff', 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-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/workflows/{workflow_id}/revisions/diff")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"base": {
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provenance": "compiled"
},
"target": {
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provenance": "compiled"
},
"fidelity": "exact",
"source_diff": {
"instructions": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"config": {
"added": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"removed": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"changed": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
},
"policies": {
"added": [
"<string>"
],
"removed": [
"<string>"
]
},
"tool_input_defaults": {
"added": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"removed": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"changed": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
},
"model_settings": {
"analyzer": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
],
"router": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
}
},
"graph_diff": {
"summary": {
"nodes_added": 0,
"nodes_removed": 0,
"nodes_changed": 0,
"edges_added": 0,
"edges_removed": 0,
"edges_changed": 0,
"context_vars_added": 0,
"context_vars_removed": 0,
"context_vars_changed": 0
},
"graph_meta": {
"persona": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
}
},
"nodes": {
"added": [
{
"id": "<string>",
"kind": "agent",
"is_entry": false,
"name": "<string>",
"instructions": "<string>",
"required_writes": [
"<string>"
],
"writes": [
"<string>"
],
"done_when_readable": "<string>",
"tools": [
{
"canonical_key": "<string>",
"display_name": "<string>",
"produces_variables": [
"<string>"
]
}
],
"knowledge_bases": [
{
"kb_id": "<string>",
"display_name": "<string>",
"clearance_level": 123
}
],
"allow_jump_back": false,
"jump_back_target": false,
"jump_back_when": "<string>",
"description": "<string>",
"failure_message": "<string>",
"steps": [
{
"id": "<string>",
"kind": "speak",
"text": "<string>",
"tool_display_name": "<string>",
"knowledge_base_names": [
"<string>"
]
}
],
"result_write_names": [
"<string>"
],
"static_text": "<string>",
"voice_config": {
"targets": [
{
"label": "<string>",
"when_to_use": "<string>"
}
],
"connecting_text": "<string>",
"mode": "cold",
"max_retries": 1,
"retry_text": "<string>"
},
"on_failure": "<string>",
"condition_readable": "<string>",
"approver_role": "<string>",
"suspend_message": "<string>",
"timeout_seconds": 123,
"on_approve": "<string>",
"on_deny": "<string>",
"component_workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pinned_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input_bindings": [
{}
]
}
],
"removed": [
{
"id": "<string>",
"kind": "agent",
"is_entry": false,
"name": "<string>",
"instructions": "<string>",
"required_writes": [
"<string>"
],
"writes": [
"<string>"
],
"done_when_readable": "<string>",
"tools": [
{
"canonical_key": "<string>",
"display_name": "<string>",
"produces_variables": [
"<string>"
]
}
],
"knowledge_bases": [
{
"kb_id": "<string>",
"display_name": "<string>",
"clearance_level": 123
}
],
"allow_jump_back": false,
"jump_back_target": false,
"jump_back_when": "<string>",
"description": "<string>",
"failure_message": "<string>",
"steps": [
{
"id": "<string>",
"kind": "speak",
"text": "<string>",
"tool_display_name": "<string>",
"knowledge_base_names": [
"<string>"
]
}
],
"result_write_names": [
"<string>"
],
"static_text": "<string>",
"voice_config": {
"targets": [
{
"label": "<string>",
"when_to_use": "<string>"
}
],
"connecting_text": "<string>",
"mode": "cold",
"max_retries": 1,
"retry_text": "<string>"
},
"on_failure": "<string>",
"condition_readable": "<string>",
"approver_role": "<string>",
"suspend_message": "<string>",
"timeout_seconds": 123,
"on_approve": "<string>",
"on_deny": "<string>",
"component_workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pinned_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input_bindings": [
{}
]
}
],
"changed": [
{
"id": "<string>",
"kind": "agent",
"changes": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
}
]
},
"edges": {
"added": [
{
"from_node": "<string>",
"to_node": "<string>",
"condition_readable": "<string>",
"is_failure_path": false
}
],
"removed": [
{
"from_node": "<string>",
"to_node": "<string>",
"condition_readable": "<string>",
"is_failure_path": false
}
],
"changed": [
{
"from_node": "<string>",
"to_node": "<string>",
"changes": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
}
]
},
"context_variables": {
"added": [
{
"name": "<string>",
"type": "<string>",
"source": "<string>",
"enum_values": [
"<string>"
],
"reask_cap": 123,
"description": "<string>"
}
],
"removed": [
{
"name": "<string>",
"type": "<string>",
"source": "<string>",
"enum_values": [
"<string>"
],
"reask_cap": 123,
"description": "<string>"
}
],
"changed": [
{
"name": "<string>",
"changes": [
{
"field": "<string>",
"op": "added",
"text_diff": {
"segments": [
{
"op": "equal",
"text": "<string>"
}
]
},
"before": null,
"after": null
}
]
}
]
}
},
"component_update_only": false
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}