Skip to main content
GET
Inspect the relationships HydraDB extracted from your content, such as PaymentsWorker depends on OrdersDB. Each relationship is a triplet: a starting entity (a named person, service, or topic), a relationship, and a target entity. Pass id to scope to a single source, or omit it to return all relations in the collection. Set type=memory when id belongs to a memory.

Pagination pattern

Pass each response’s next_cursor back as cursor until it is null. If next_cursor is null while is_truncated is true, the export is incomplete: retry the page or increase limit.

Behavior notes

  • Cursor opacity: next_cursor is opaque (currently the timestamp, in Unix seconds, of the last group returned). Do not construct it client-side or assume meaning: pass back exactly what the server returned.
  • Full-graph exports: Omit id, use a small limit, and paginate. limit counts relation groups, from 1 to 10000 (default 5000).
  • Ordering: data.relations[] comes back newest first, by each group’s latest relation timestamp, not by relevance.
  • Unknown id: Returns 200 with an empty relations list, not an error. So does an id the acl principals may not see.
  • auxiliary_relations: The structural graph around the sources (who sent a message, which comments hang off it), in the same triplet shape. It does not count against limit; auxiliary_truncated is true when it was clipped.
  • Graph completeness: A source’s relations are fully populated only once its indexing_status reaches completed. Sources in graph_creation are searchable, but their relations may still be in flight.
  • timestamp format differs by endpoint: On this endpoint each relation’s timestamp is an ISO-8601 string (for example 2026-05-12T08:14:00Z). The same relations surfaced as passthrough on Query (in graph_context) and List Context carry timestamp as a Unix epoch float (seconds) instead. Normalize before comparing relation timestamps across endpoints.
  • Access control: acl lists the principals to answer as. Only relations from sources those principals may see are returned. Repeat or comma-separate values, or omit acl for no caller-supplied ACL filtering. For enforced connectors, the authenticated caller is used instead; see ACL enforcement.

Errors

Common codes: 400 INVALID_INPUT (missing database, a limit outside 1 to 10000, or a non-numeric cursor), 404 DATABASE_NOT_FOUND, 500 INTERNAL_ERROR (a transient graph read failure; retry the request). See Error Responses for the full list.
  • Before this: Ingestion Status: confirm the graph is complete
  • Related: Connected Subgraph: threads, parents, children, and declared links around one source
  • Related: Query: return relations with results using graph_context: true
  • Guide: Query

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer <your_api_key>.

Query Parameters

database
string
required

Database to read. Required.

Example:

"acme_corp"

collection
string

Collection to read. Defaults to the database's default collection.

Example:

"team_docs"

tenant_id
string
deprecated

Deprecated: use database.

Example:

"tenant_1234"

sub_tenant_id
string
deprecated

Deprecated: use collection.

Example:

"sub_tenant_4567"

id
string

context_id of the context whose relations to return. Omit it for relations across the whole collection.

Example:

"HydraDoc1234"

type
enum<string>

Corpus to read, knowledge or memory. Defaults to knowledge.

Available options:
knowledge,
memory
limit
integer
default:5000

Maximum number of relation groups to return, from 1 to 10000. Default 5000.

cursor
number

The next_cursor from the previous page, passed back unchanged. Omit it for the first page.

acl
string[]

Optional principals for non-enforced connectors. Enforced connectors use the caller and return acl_ignored_by_connector_enforcement only when acl is supplied.

Response

OK

data
GraphGraphRelationsResponse · object
Example:
error
HandlerApiError · object | null

Error details on failure, or null on success.

Example:

null

meta
HandlerResponseMeta · object
Example:
success
boolean

Whether the request succeeded.

Example:

true