Skip to main content

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

ParameterTypeRequiredDescription
projectIdstring (GUID)YesThe ID of the project to report on.

Headers

HeaderRequiredDefaultDescription
X-Tenant-IdNodefaultThe tenant to scope the status to. Must match the tenant the project was analysed under, or nothing will be reported as indexed.

Response

PropertyTypeDescription
projectIdstringThe project the status was requested for.
userIdstringThe authenticated user the status is scoped to.
tenantIdstringThe tenant the status is scoped to, after normalization (an absent header becomes "default").
indexedbooleanThe authoritative flag. true when imported content exists that a retrieval by this user, for this project, under this tenant could match.
chunkCountnumberNumber of imported chunks in scope.
itemCountnumberNumber of distinct source elements those chunks came from.
importedItemIdsstring[]Those element IDs, raw as stored — document pages appear as {id}_page_{i} and clusters as cluster-….
registeredInUserIndexbooleanWhether 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

indexedregisteredInUserIndexMeaningWhat to do
truetrueThe project is analysed and retrievable.Query it. An empty retrieval result means the query genuinely has no match.
falsetrueAnalysed, 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.
falsefalseNever 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 StatusReasonDescription
400Invalid UserIdThe token carries no user identity.
400Status FailedAn 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.