Serverless AI Context Database Stats

AI service that retrieves statistics about documents stored in a vector collection.

Endpoint

Get statistics about documents stored in a specified collection or all collections

GEThttps://api.xtartapp.com/data/memory/stats

Additional Endpoints

*Authentication

You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.

Request body

NameTypeRequiredMaxDescription
collectionstringNo-The name of the collection to get statistics for. If not provided, statistics for all collections will be returned.

Response

NameTypeDescription
dataobjectThe statistics data
data.documentsarrayArray of document statistics when a collection is specified
data.documents[].namestringThe document name
data.documents[].sizenumberNumber of chunks for this document
data.collectionsarrayArray of collection statistics when no specific collection is provided
data.collections[].namestringThe collection name
data.collections[].sizenumberNumber of documents in this collection
data.collectionstringThe name of the queried collection
metadataobjectMetadata about the request
metadata.costnumberThe cost of the request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400DATA_LOADER_ERRORError occurred while retrieving collection statistics.
400INSUFFICIENT_BALANCEThe user has insufficient balance to perform the operation.
401UNAUTHORIZEDThe token is invalid.
429TOO_MANY_REQUESTSThe request limit has been reached.