Skip to content

Read a specific branch's graph

GET
/v1/branches/{branch_id}/graph
curl --request GET \
--url https://api.hydrate.sh/v1/branches/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/graph \
--header 'Authorization: Bearer <token>'

Read the full graph (nodes, ports, edges, version) of a specific branch. Use the returned version as expected_version on a subsequent apply to that branch.

branch_id
required
Branch Id

The branch to read.

string format: uuid

The branch to read.

Successful Response

Media typeapplication/json
GraphResponse
object
branch
required
BranchRef
object
id
required
Id
string format: uuid
version
required
Version
integer
edges
required
Edges
Array<object>
WireEdge

Read-path edge: source/target are server-derived NODE ids (absent from the client-authored h2o.types.Edge); *_handle are the PORT ids.

object
id
required
Id
string format: uuid
source
required
Source
string format: uuid
source_handle
required
Any of:
string format: uuid
target
required
Target
string format: uuid
target_handle
required
Any of:
string format: uuid
nodes
required
Nodes
Array<object>
WireNode
object
data
required
WireNodeData

Read-path node data. NOT h2o.NodeData: the response omits kind/parent_id (those live on the wrapper) and emits the boundary/ external scalars matrix-conditionally — so the matrix fields are optional (absent = not-applicable-to-kind).

object
config
Config
Array<object>
WirePort
object
contract_name
Any of:
string
<= 500 characters
description
Description
string
""
external
External
boolean
id
required
Id
string format: uuid
name
Name
string
""
type
Type
string
""
constraints
Constraints
Array<string>
description
required
Description
string
documentation_url
Any of:
string
external_kind
Any of:
string
inputs
Inputs
Array<object>
WirePort
object
contract_name
Any of:
string
<= 500 characters
description
Description
string
""
external
External
boolean
id
required
Id
string format: uuid
name
Name
string
""
type
Type
string
""
is_external
required
Is External
boolean
is_test_node
required
Is Test Node
boolean
language
Any of:
string
name
required
Name
string
outputs
Outputs
Array<object>
WirePort
object
contract_name
Any of:
string
<= 500 characters
description
Description
string
""
external
External
boolean
id
required
Id
string format: uuid
name
Name
string
""
type
Type
string
""
path_prefix
Any of:
string
protocol
Any of:
string
source_decisions
Any of:
Array<string>
status
required
Status
string
user_kind
Any of:
string
verifications
Verifications
Array<object>
WireVerification
object
author
required
Author
string
Allowed values: user agent
id
required
Id
string format: uuid
text
required
Text
string
type
Any of:
string
id
required
Id
string format: uuid
kind
required
Kind
string
Allowed values: behavior boundary state io interface
parent_id
required
Any of:
string format: uuid
position
required
Position
object
x
required
X
number
y
required
Y
number
project_id
required
Project Id
string format: uuid
version
required
Version
string
Example
{
"nodes": [
{
"data": {
"config": [
{
"contract_name": null,
"description": "",
"external": false,
"name": "",
"type": ""
}
],
"documentation_url": null,
"external_kind": null,
"inputs": [
{
"contract_name": null,
"description": "",
"external": false,
"name": "",
"type": ""
}
],
"language": null,
"outputs": [
{
"contract_name": null,
"description": "",
"external": false,
"name": "",
"type": ""
}
],
"path_prefix": null,
"protocol": null,
"source_decisions": null,
"user_kind": null,
"verifications": [
{
"author": "user",
"type": null
}
]
},
"kind": "behavior"
}
]
}

No credentials, malformed credentials, or revoked credentials. The envelope is leak-parity (same shape across all 401 paths) so an attacker cannot distinguish revoked vs. unknown via the body.

Media typeapplication/json
object
detail
required
string
Example
{
"detail": "unauthenticated"
}

Credentials are valid but lack the scope required for this route, or the principal lacks membership in the target project.

Media typeapplication/json
object
detail
object
code
string
message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Resource not found OR not accessible to this principal. Leak parity: the response is identical in both cases so an attacker cannot enumerate resources via 404-vs-403 timing.

Media typeapplication/json
object
detail
object
code
string
message
string
Example
{
"detail": {
"code": "not_found"
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}

Per-bucket rate limit exceeded. The response carries Retry-After and the standard X-RateLimit-* headers (Limit / Remaining / Reset).

Media typeapplication/json
object
detail
string
Example
{
"detail": "rate_limited"
}
Retry-After
integer
X-RateLimit-Limit
integer
X-RateLimit-Remaining
integer
X-RateLimit-Reset
integer