Skip to content
Select themeSelect language

#1306 slice 1 — traverse the persisted memory-edge sidecar from a root memory.

GET
/api/memories/graph/traverse
curl --request GET \
--url 'https://example.com/api/memories/graph/traverse?root=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'
root
required
string format: uuid

Root memory id the traversal starts from.

depth
integer format: int32

Requested depth; clamped server-side to 1..=3.

The reached memory subgraph from the root, within the applied depth

Media typeapplication/json

The traversal read: the root, the applied depth, and the reached subgraph.

object
edges
required
Array<object>

One edge among the reached memories.

object
kind
required
string
source_memory_id
required
string format: uuid
target_memory_id
required
string format: uuid
weight
required
number format: double
max_depth
required
integer format: int32
nodes
required
Array<object>

One reached memory at its shortest depth, with the path that reached it.

object
depth
required
integer format: int32
memory_id
required
string format: uuid
path
required
Array<string>
root
required
string format: uuid
Examplegenerated
{
"edges": [
{
"kind": "example",
"source_memory_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"target_memory_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"weight": 1
}
],
"max_depth": 1,
"nodes": [
{
"depth": 1,
"memory_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"path": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}
],
"root": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Structured client error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Authentication required

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Permission denied

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Structured server error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}