Delete Collection
DELETE https://api.credal.ai/api/v0/documentCollections/deleteCollection Content-Type: application/json
Delete the collection.
Reference: https://docs.credal.ai/api-reference/api-reference/document-collections/delete-collection
Authentication
Section titled “Authentication”Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Section titled “Request”Body (application/json)
Section titled “Body (application/json)”This endpoint expects an object.
collectionId(UUID, required)
Response
Section titled “Response”collectionId(UUID, required)
Examples
Section titled “Examples”Request
{
"collectionId": "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
}Response
{
"collectionId": "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
}SDK Code
import { CredalClient } from "@credal/sdk";
async function main() {
const client = new CredalClient({
apiKey: "YOUR_TOKEN_HERE",
});
await client.documentCollections.deleteCollection({
collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
});
}
main();
from credal import CredalV0
import uuid
client = CredalV0(
api_key="YOUR_TOKEN_HERE",
)
client.document_collections.delete_collection(
collection_id=uuid.UUID("ac20e6ba-0bae-11ef-b25a-efca73df4c3a"),
)