Knowledge Status
Reports whether a project's knowledge is indexed and retrievable for the calling user — the precondition for Retrieve Knowledge. Use it to tell "this project was never analysed for me" apart from "this query has no match", which the retrieval endpoint cannot distinguish on its own.
The status is scoped exactly the way retrieval is: the user comes from the API token, the tenant from the X-Tenant-Id header, and the counts come from the same imported rows a search filters.
Endpoint
GET /api/v1/memory/status/{projectId}
Authentication
All requests require a valid API token. You can generate an API token at https://account.deon.cloud/account/api-tokens. Use the DeonApiKey scheme in the Authorization header:
Authorization: DeonApiKey <your-api-token>
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string (GUID) | Yes | The ID of the project to report on. |
Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Tenant-Id | No | default | The tenant to scope the status to. Must match the tenant the project was analysed under, or nothing will be reported as indexed. |
Response
| Property | Type | Description |
|---|---|---|
projectId | string | The project the status was requested for. |
userId | string | The authenticated user the status is scoped to. |
tenantId | string | The tenant the status is scoped to, after normalization (an absent header becomes "default"). |
indexed | boolean | The authoritative flag. true when imported content exists that a retrieval by this user, for this project, under this tenant could match. |
chunkCount | number | Number of imported chunks in scope. |
itemCount | number | Number of distinct source elements those chunks came from. |
importedItemIds | string[] | Those element IDs, raw as stored — document pages appear as {id}_page_{i} and clusters as cluster-…. |
registeredInUserIndex | boolean | Whether the project registry lists this project for the user. The registry carries no tenant, so true together with indexed: false means the project was analysed under a different tenant than the request. |
Interpreting the result
indexed | registeredInUserIndex | Meaning | What to do |
|---|---|---|---|
true | true | The project is analysed and retrievable. | Query it. An empty retrieval result means the query genuinely has no match. |
false | true | Analysed, but under a different tenant than this request. | Send the X-Tenant-Id the project was analysed under, or re-run the analysis under this one. |
false | false | Never analysed by this user. | Run the project analysis as this user. A colleague's analysis does not count. |
Examples
curl
curl "https://api.deon.cloud/api/v1/memory/status/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: DeonApiKey <token>" \
-H "X-Tenant-Id: 4"
JavaScript
const response = await fetch(
`https://api.deon.cloud/api/v1/memory/status/${projectId}`,
{
headers: {
Authorization: `DeonApiKey ${token}`,
"X-Tenant-Id": String(tenantId),
},
}
);
const status = await response.json();
if (!status.indexed) {
console.log(
status.registeredInUserIndex
? "Analysed under a different tenant."
: "Not analysed yet."
);
}
Response
{
"projectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"userId": "9f8e7d6c-5b4a-3210-9876-543210fedcba",
"tenantId": "4",
"indexed": true,
"chunkCount": 412,
"itemCount": 37,
"importedItemIds": [
"11111111-1111-1111-1111-111111111111",
"22222222-2222-2222-2222-222222222222_page_1"
],
"registeredInUserIndex": true
}
Error Handling
| HTTP Status | Reason | Description |
|---|---|---|
400 | Invalid UserId | The token carries no user identity. |
400 | Status Failed | An error occurred while reading the index status. |
A project that is unknown or has nothing indexed is not an error — it returns 200 with indexed: false and zero counts.