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
| Name | Type | Required | Max | Description |
|---|---|---|---|---|
| collection | string | No | - | The name of the collection to get statistics for. If not provided, statistics for all collections will be returned. |
Response
| Name | Type | Description |
|---|---|---|
| data | object | The statistics data |
| data.documents | array | Array of document statistics when a collection is specified |
| data.documents[].name | string | The document name |
| data.documents[].size | number | Number of chunks for this document |
| data.collections | array | Array of collection statistics when no specific collection is provided |
| data.collections[].name | string | The collection name |
| data.collections[].size | number | Number of documents in this collection |
| data.collection | string | The name of the queried collection |
| metadata | object | Metadata about the request |
| metadata.cost | number | The cost of the request |
Errors
{
"error": "string",
"code": "string"
}| HTTP Status | Error Code | Message |
|---|---|---|
| 400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
| 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. |