Skip to main content
GET
Graph Relations By Id

When to use it

  • Debugging graph construction – verify HydraDB extracted the relationships you expected
  • Visualizations – build entity graphs in admin UIs
  • Audit – confirm what entities and connections exist for a specific document
This endpoint returns the raw triplets (subject → predicate → object) that HydraDB extracted from a single source.

Endpoint

  • Auth: Bearer token
  • Idempotency: Read-only
  • Async: No

Example

Query parameters

Response

Entity types

The type field on each entity is normalized at extraction. Common types: The full list depends on what HydraDB extracted from your specific content.

Behavior notes

No relations doesn’t mean no graph. A source might be successfully indexed without producing extractable triplets (very short content, structured data, or content without clear entity-relationship language). Use this endpoint to confirm what was actually extracted.
Memories vs knowledge. Set is_memory: true to look up relations for a memory item. The default (false) targets knowledge sources.
  • Browse sources first: List data – find the source_id you want to inspect
  • Retrieve content: Fetch content – get the original file or text
  • Use in recall: Full recall with graph_context: true – see graph context applied to a query

Errors

Common codes: 400 INVALID_PARAMETERS, 404 SOURCE_NOT_FOUND, 422 VALIDATION_ERROR. See Error Responses for the full list. Read more: Essentials → Context Graphs

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

source_id
string
required

The source ID to fetch relations for

Example:

"<str>"

tenant_id
string
default:""

Unique identifier for the tenant/organization

Example:

"tenant_1234"

is_memory
boolean
default:false

Whether to fetch relations for memories

Example:

"<str>"

sub_tenant_id
string | null

Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.

Example:

"sub_tenant_4567"

limit
integer
default:250

Maximum number of relations to return

Example:

"<str>"

Response

Successful Response

relations
(TripletWithEvidence · object | null)[]
required

List of relations retrieved

Triple with multiple evidence items from different chunks

Example:
success
boolean
default:true

Indicates whether the request was successful

Example:

true

message
string
default:Relations retrieved successfully

Response message describing the operation result