Serverless AI Context Database Delete
AI service that deletes a document or an entire collection from the context database.
Endpoint
Delete a document or an entire collection from the context database
DELETEhttps://api.xtartapp.com/data/memory
*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 delete or containing the document to delete. |
document | string | No | - | Unique identifier for the document to delete. If not provided, the entire collection will be deleted. |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the delete operation |
data.deleted | boolean | Indicates if the document or collection was successfully deleted |
data.document | string | The name of the document that was deleted (if applicable) |
data.collection | string | The name of the collection that was involved in the operation |
metadata | object | Metadata about the delete process |
metadata.cost | number | The cost of the delete request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | MEMORY_ERROR | Ex: could not delete collection or document | collection not found |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |