Skip to main content
This action is irreversible. Proceed with caution.
Deletes the current index and all its associated data from the CyborgDB service.

Returns

Promise<SuccessResponseModel>: A Promise that resolves to a success response object containing the operation status and message.

Exceptions

  • Throws if the API request fails due to network connectivity issues.
  • Throws if authentication fails (invalid API key).
  • Throws if there are internal server errors preventing the deletion.
  • Returns success status if the index was already deleted or doesn’t exist.
  • Throws if the encryption key is invalid for the specified index.

Example Usage

Response Format

The method returns a success response object with the following structure:

Response Fields

Best Practices

  • Confirmation: Always implement user confirmation for deletion operations in production applications
  • Backup: Consider exporting important data before deletion if needed for recovery
  • Cleanup: Remove local references to deleted indexes to prevent memory leaks
  • Error Handling: Implement proper error handling to gracefully handle network failures
  • Logging: Log deletion operations for audit trails and debugging
  • Batch Operations: When deleting multiple indexes, handle failures gracefully to avoid partial cleanup states

Important Notes

  • Once deleted, the index and all its data cannot be recovered
  • The operation affects all vectors, metadata, and configuration associated with the index
  • Other applications or services using the same index will lose access immediately
  • The deletion is performed on the CyborgDB service and cannot be undone