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
Name | Type | Required | Max | Description |
---|---|---|---|---|
collection | string | Yes | - | The name of the collection to get statistics for. This will be used as part of the collection identifier. |
Response
Name | Type | Description |
---|---|---|
data | object | The statistics data for the collection |
data.count | number | Total number of documents/chunks in the collection |
data.results | array | Array of document statistics |
data.results[].docId | string | The document identifier |
data.results[].count | number | Number of chunks for this document |
metadata | object | Metadata about the data loader stats request |
metadata.cost | number | The cost of the data loader stats request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid or collection parameter is missing. |
400 | DATA_LOADER_ERROR | Error occurred while retrieving collection statistics. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance to perform the operation. |
401 | UNAUTHORIZED | The token is invalid. |
429 | TOO_MANY_REQUESTS | The request limit has been reached. |