Serverless AI Data Collection Stats

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

Endpoint

Get statistics about documents stored in a specified collection

POSThttps://api.xtartapp.com/data/loader/stats

*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
collectionstringYes-The name of the collection to get statistics for. This will be used as part of the collection identifier.

Response

NameTypeDescription
dataobjectThe statistics data for the collection
data.countnumberTotal number of documents/chunks in the collection
data.resultsarrayArray of document statistics
data.results[].docIdstringThe document identifier
data.results[].countnumberNumber of chunks for this document
metadataobjectMetadata about the data loader stats request
metadata.costnumberThe cost of the data loader stats request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid or collection parameter is missing.
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.