Hanzo
OpenapiIndex

Counts the documents in each of your indexes.

Counts the documents in each of your indexes. Reports every index the caller's own org holds with its document count, plus the org's total.

GET /v1/index/stats

Addresshttps://api.hanzo.ai/v1/index/stats
MethodGET
Operationget_index_stats
AuthAuthorization: Bearer $HANZO_API_KEY

Counts the documents in each of your indexes.

Reports every index the caller's own org holds with its document count, plus the org's total. isIndexing is always false because writes here are applied before their response — there is never a background pass to wait on.

The tenant is the org minted from the VALIDATED bearer's owner claim, never a client-supplied header, so this counts the caller's own documents and no other tenant's. Without a validated principal the answer is 403 carrying the dialect's invalid_api_key body.

Request

GET /v1/index/stats takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200indexStatsok

200 body — 5 fields.

FieldInTypeAlwaysDescription
databaseSizebodyintegerDatabaseSize is the org's total document count across its indexes.
indexesbodyobjectIndexes maps each index uid to its own count.
indexes.*bodyindexCount
indexes.*.isIndexingbodybooleanIsIndexing is always false: writes are applied before their response, so there is never a background pass a caller could be waiting on.
indexes.*.numberOfDocumentsbodyintegerNumberOfDocuments is how many documents this org holds in that index.

Failure carries the platform error shape — see Errors.

Examples

hanzo index stats

Index API · All Hanzo APIs · Interactive reference

How is this guide?

On this page