v1

latestOpenAPI 3.1.0Proprietary2026-07-262570100.1 KB
context

Get graph relations

Return knowledge-graph relations for a tenant or a single source.

get/context/relations

Query parameters

databasestring required
Example:acme_corp

Database (canonical name for the tenant scope)

collectionstring
Example:team_docs

Collection (canonical name for the sub-tenant scope)

tenant_idstring
Example:tenant_1234

Deprecated alias for database

sub_tenant_idstring
Example:sub_tenant_4567

Deprecated alias for collection

idstring
Example:HydraDoc1234

Source ID (omit for database-wide relations)

type'knowledge' | 'memory'

Corpus type: 'knowledge' or 'memory'

limitinteger

Max relations to return

cursornumber

Pagination cursor

Response

OK

successboolean

Whether the request succeeded.

Example response

{
  "data": {
    "message": "Success",
    "next_cursor": 0.5,
    "relations": [
      {
        "chunk_id": "HydraEmbeddings123_0",
        "relations": [
          {
            "canonical_predicate": "works_at",
            "chunk_id": "HydraEmbeddings123_0",
            "confidence": 0.92,
            "context": "Ada joined Acme Corp in 2024 as a staff engineer.",
            "raw_predicate": "is employed by",
            "relationship_id": "rel_1234",
            "source_entity_id": "entity_1a2b",
            "target_entity_id": "entity_3c4d",
            "temporal_details": "since 2024",
            "timestamp": "2026-07-02T10:00:00Z"
          }
        ],
        "source": {
          "entity_id": "entity_1a2b",
          "identifier": "Acme Corp",
          "name": "general",
          "namespace": "organization",
          "provider": "slack",
          "type": "knowledge"
        },
        "target": {
          "entity_id": "entity_1a2b",
          "identifier": "Acme Corp",
          "name": "general",
          "namespace": "organization",
          "provider": "slack",
          "type": "knowledge"
        }
      }
    ],
    "success": true
  },
  "error": {
    "code": "DATABASE_NOT_FOUND",
    "message": "Database not found"
  },
  "meta": {
    "collection": "team_docs",
    "database": "acme_corp",
    "deprecation": [
      {
        "deprecated": true,
        "deprecated_field": "tenant_id",
        "deprecated_since": "2.0.1",
        "message": "tenant_id is deprecated; use database instead.",
        "preferred_field": "database"
      }
    ],
    "latency_ms": 12.3,
    "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
    "source_type": "file",
    "sub_tenant_id": "sub_tenant_4567",
    "tenant_id": "tenant_1234"
  },
  "success": true
}