status = client.context.status(
database="acme_corp",
collection="team_docs",
ids=["policy_main", "runbook_deploy", "typo_in_id"],
)
const status = await client.context.status({
database: "acme_corp",
collection: "team_docs",
ids: ["policy_main", "runbook_deploy", "typo_in_id"],
});
curl -G 'https://api.hydradb.com/context/status' \
-H "Authorization: Bearer <your_api_key>" \
-H "API-Version: 2" \
--data-urlencode "database=acme_corp" \
--data-urlencode "collection=team_docs" \
--data-urlencode "ids=policy_main,runbook_deploy,typo_in_id"
{
"success": true,
"data": {
"statuses": [
{
"id": "policy_main",
"indexing_status": "completed",
"error_code": "",
"message": "Processing status retrieved successfully"
},
{
"id": "runbook_deploy",
"indexing_status": "graph_creation",
"error_code": "",
"message": "Processing status retrieved successfully"
},
{
"id": "typo_in_id",
"indexing_status": "errored",
"error_code": "FILE_NOT_FOUND",
"error_message": "",
"message": "ID not found"
}
]
},
"error": null,
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 12.3
}
}
{
"success": false,
"data": null,
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 4.8
}
}
Context
Ingestion Status
Check whether ingested documents, app sources, or memories are ready to query.
GET
/
context
/
status
status = client.context.status(
database="acme_corp",
collection="team_docs",
ids=["policy_main", "runbook_deploy", "typo_in_id"],
)
const status = await client.context.status({
database: "acme_corp",
collection: "team_docs",
ids: ["policy_main", "runbook_deploy", "typo_in_id"],
});
curl -G 'https://api.hydradb.com/context/status' \
-H "Authorization: Bearer <your_api_key>" \
-H "API-Version: 2" \
--data-urlencode "database=acme_corp" \
--data-urlencode "collection=team_docs" \
--data-urlencode "ids=policy_main,runbook_deploy,typo_in_id"
{
"success": true,
"data": {
"statuses": [
{
"id": "policy_main",
"indexing_status": "completed",
"error_code": "",
"message": "Processing status retrieved successfully"
},
{
"id": "runbook_deploy",
"indexing_status": "graph_creation",
"error_code": "",
"message": "Processing status retrieved successfully"
},
{
"id": "typo_in_id",
"indexing_status": "errored",
"error_code": "FILE_NOT_FOUND",
"error_message": "",
"message": "ID not found"
}
]
},
"error": null,
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 12.3
}
}
{
"success": false,
"data": null,
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 4.8
}
}
Ingestion is asynchronous. Call this endpoint with the IDs returned by Ingest Context to learn when each document, app source, or memory is ready to query.
To be notified instead of polling, register a webhook for
Typical indexing time:
indexing.status_changed events. HydraDB sends a POST to your endpoint when a source reaches a terminal state (completed or errored). See Webhooks for setup and receiver examples.
status = client.context.status(
database="acme_corp",
collection="team_docs",
ids=["policy_main", "runbook_deploy", "typo_in_id"],
)
const status = await client.context.status({
database: "acme_corp",
collection: "team_docs",
ids: ["policy_main", "runbook_deploy", "typo_in_id"],
});
curl -G 'https://api.hydradb.com/context/status' \
-H "Authorization: Bearer <your_api_key>" \
-H "API-Version: 2" \
--data-urlencode "database=acme_corp" \
--data-urlencode "collection=team_docs" \
--data-urlencode "ids=policy_main,runbook_deploy,typo_in_id"
{
"success": true,
"data": {
"statuses": [
{
"id": "policy_main",
"indexing_status": "completed",
"error_code": "",
"message": "Processing status retrieved successfully"
},
{
"id": "runbook_deploy",
"indexing_status": "graph_creation",
"error_code": "",
"message": "Processing status retrieved successfully"
},
{
"id": "typo_in_id",
"indexing_status": "errored",
"error_code": "FILE_NOT_FOUND",
"error_message": "",
"message": "ID not found"
}
]
},
"error": null,
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 12.3
}
}
{
"success": false,
"data": null,
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 4.8
}
}
Passing IDs
- Send IDs in
ids, a single ID inid, or both. HydraDB merges them. At least one ID is required. idsaccepts repeated parameters (ids=a&ids=b) or one comma-joined value (ids=a,b). Source IDs never contain commas (ingest rejects them), so the comma-joined form always splits unambiguously.- Whitespace is trimmed, empty entries are dropped, and duplicates are removed.
Status values
Each entry indata.statuses describes one requested ID. Read its indexing_status:
| Status | Searchable? | Meaning |
|---|---|---|
queued | No | Accepted by the server, not yet picked up by a worker. |
processing | No | Content is being parsed, chunked, and embedded. |
graph_creation | Yes | Searchable through /query. Graph creation is still in progress. |
completed | Yes | Fully indexed and graphed. Ready for all retrieval modes. |
errored | No | Indexing failed. Inspect error_code and error_message. Terminal. |
Error code values
error_code explains why an ID was not found or ingestion failed. It is empty unless indexing_status is errored.
error_code | Meaning | What to do |
|---|---|---|
FILE_NOT_FOUND | The ID was not found in this database and collection. | Check the ID and scope, or ingest the source. |
E#### | Ingestion failed. | Follow the error code guidance. |
error_messageexplains an ingestion failure. It is empty otherwise, including forFILE_NOT_FOUND.messagedescribes the lookup, not indexing. Useindexing_statusanderror_codein your application logic. Message text may change.- Status records can expire. A source that completed still reports
completedafter its record expires. A source that never finished before its record expired reportserroredwithE9004; ingest it again.
Polling patterns
Stop when content is searchable
Use this for most retrieval flows. Atgraph_creation, chunks are indexed and a query can return them. Allow a few seconds after the status first appears: a query sent immediately can still miss the source, and a collection that is new can still be reported as not existing. To query straight after ingesting, wait for completed.
import time
ids = ["policy_main", "runbook_deploy"]
while True:
response = client.context.status(
database="acme_corp",
collection="team_docs",
ids=ids,
)
statuses = [s.indexing_status for s in response.data.statuses]
if len(statuses) == len(ids) and all(s in ("graph_creation", "completed") for s in statuses):
break
if any(s == "errored" for s in statuses):
raise RuntimeError("Context processing failed")
time.sleep(5)
const ids = ["policy_main", "runbook_deploy"];
while (true) {
const response = await client.context.status({
database: "acme_corp",
collection: "team_docs",
ids: ids,
});
const statuses = response.data?.statuses?.map((s) => s.indexingStatus) ?? [];
if (statuses.length === ids.length && statuses.every((s) => s === "graph_creation" || s === "completed")) break;
if (statuses.some((s) => s === "errored")) throw new Error("Context processing failed");
await new Promise((r) => setTimeout(r, 5000));
}
Stop when graph processing is complete
Use this before graph-heavy operations such as/context/relations, or when you require complete graph_context.
import time
ids = ["policy_main", "runbook_deploy"]
while True:
response = client.context.status(
database="acme_corp",
collection="team_docs",
ids=ids,
)
statuses = [s.indexing_status for s in response.data.statuses]
if len(statuses) == len(ids) and all(s == "completed" for s in statuses):
break
if any(s == "errored" for s in statuses):
raise RuntimeError("Graph processing failed")
time.sleep(5)
- Memories (text, markdown, conversation pairs): seconds
- Small documents (under 50 pages): 1 to 5 minutes
- Large documents (50+ pages): 5 to 15 minutes
Errors
Common codes:400 INVALID_INPUT (for example database and tenant_id both sent with different values), 404 DATABASE_NOT_FOUND, 422 VALIDATION_ERROR (missing database, or no ID). See Error Responses for the full list.
Related resources
- Before this: Ingest Context: returns the IDs to check
- After this: Query: once sources are searchable
- After this: Inspect Context: read a source’s stored content
- After this: Inspecting Context Relations: once sources are
completed - Guide: Context
Authorizations
Query Parameters
Response
OK
Show child attributes
Show child attributes
Example:
{
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "sub_tenant_4567",
"tenant_id": "tenant_1234",
"warnings": [
{
"code": "acl_ignored_by_connector_enforcement",
"collections": ["team_docs", "engineering"],
"message": "This connector enforces ACL, so the request's acl was ignored."
}
]
}
Was this page helpful?
