Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Document → Batch Delete

AI-generated

Overview

This node interacts with the Appwrite API to perform batch deletion of documents within a specified database and collection. It is useful for scenarios where multiple documents need to be deleted efficiently in batches, such as cleaning up outdated records or removing bulk data entries. Users can specify the database and collection IDs, provide an array of document IDs to delete, and control batch size and processing behavior.

Use Case Examples

  1. Deleting multiple user records from a user database collection in batches to avoid API rate limits.
  2. Removing a set of outdated documents from a content management system's database collection in parallel for faster processing.

Properties

Name Meaning
Database ID The ID of the database where the documents reside.
Collection ID The ID of the collection within the database containing the documents to delete.
Batch Items An array of documents to delete, each item must include a documentId property identifying the document to be deleted.
Continue on Error Whether to continue processing remaining items if some deletions fail.
Batch Size Number of items to process in each batch, ranging from 1 to 100.
Parallel Processing Whether to process items in parallel for faster execution, which may increase the risk of rate limiting.

Output

JSON

  • json - The result of the batch delete operation, including success or error details for each document processed.

Dependencies

  • Appwrite API key credential for authentication

Troubleshooting

  • Common issues include API rate limiting when processing large batches or using parallel processing; reducing batch size or disabling parallel processing can help.
  • Errors may occur if invalid databaseId, collectionId, or documentId values are provided; ensure all IDs are correct and exist in the Appwrite project.
  • If 'Continue on Error' is false, the node will stop processing on the first failure, which may be unexpected; set it to true to process all items regardless of individual errors.

Discussion