v1
latestOpenAPI 3.1.0Proprietary2026-07-262570100.1 KBquery
Unified query
Unified query endpoint that dispatches across type (knowledge/memory/all) and query_by (hybrid/text). Prefer sub_tenant_ids for sub-tenant scoping; legacy sub_tenant_id is deprecated for /query and cannot be sent together with sub_tenant_ids.
post/query
Request body
Example request
{
"additional_context": "The user is a senior engineer onboarding to the platform.",
"collection": "team_docs",
"collections": [
"finance",
"legal"
],
"database": "acme_corp",
"graph_context": true,
"graph_vector_prune": true,
"graph_vector_prune_spacy_entities": true,
"ids": [
"HydraDoc1234",
"HydraDoc4567"
],
"max_results": 10,
"metadata_filters": {
"active": true,
"additional_metadata": {
"author": "ada"
},
"department": "finance",
"priority": 7,
"tags": [
"alpha",
"beta"
]
},
"num_related_chunks": 3,
"query": "Which mode does the user prefer?",
"query_apps": true,
"query_forceful_relations": true,
"recency_bias": 0.2,
"sub_tenant_id": "sub_tenant_4567",
"sub_tenant_ids": [
"finance",
"legal"
],
"tenant_id": "tenant_1234"
}Response
OK
Example response
{
"data": {
"chunks": [
{
"additional_metadata": {
"author": "ada",
"doc_version": 3
},
"chunk_content": "HydraDB supports hybrid retrieval across knowledge and memories.",
"chunk_uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"extra_context_ids": [
"HydraEmbeddings123_2",
"HydraEmbeddings123_3"
],
"id": "HydraDoc1234",
"layout": "text",
"metadata": {
"department": "finance",
"priority": 7
},
"relevancy_score": 0.87,
"source_last_updated_time": "2026-07-02T12:30:00Z",
"source_title": "Project Phoenix Overview",
"source_type": "file",
"source_upload_time": "2026-07-02T10:00:00Z",
"sub_tenant_id": "sub_tenant_4567"
}
],
"graph_context": {
"chunk_id_to_group_ids": {
"HydraEmbeddings123_0": [
"grp_1234"
]
},
"chunk_relations": [
{
"combined_context": "Acme Corp deploys HydraDB in production for context retrieval.",
"group_id": "grp_1234",
"relevancy_score": 0.87,
"source_chunk_ids": [
"HydraEmbeddings123_0",
"HydraEmbeddings123_1"
],
"triplets": [
{
"relation": {
"confidence": 0.92,
"predicate": "works_at"
},
"source": {
"entity_id": "entity_1a2b",
"name": "Ada",
"type": "person"
},
"target": {
"entity_id": "entity_3c4d",
"name": "Acme Corp",
"type": "organization"
}
}
]
}
],
"query_paths": [
{
"combined_context": "Acme Corp deploys HydraDB in production for context retrieval.",
"group_id": "grp_1234",
"relevancy_score": 0.87,
"source_chunk_ids": [
"HydraEmbeddings123_0",
"HydraEmbeddings123_1"
],
"triplets": [
{
"relation": {
"confidence": 0.92,
"predicate": "works_at"
},
"source": {
"entity_id": "entity_1a2b",
"name": "Ada",
"type": "person"
},
"target": {
"entity_id": "entity_3c4d",
"name": "Acme Corp",
"type": "organization"
}
}
]
}
]
},
"sources": [
{
"additional_metadata": {
"author": "ada",
"doc_version": 3
},
"app_external_id": "C0123456789",
"app_kind": "slack",
"app_provider": "slack",
"description": "Internal overview of the Project Phoenix rollout.",
"id": "HydraDoc1234",
"metadata": {
"department": "finance",
"priority": 7
},
"sub_tenant_id": "sub_tenant_4567",
"timestamp": "2026-07-02T10:00:00Z",
"title": "Project Phoenix Overview",
"type": "knowledge",
"url": "https://docs.hydradb.com/phoenix"
}
]
},
"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
}