Actions118
- Item Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Server Actions
- Setting Actions
- User Actions
- Utility Actions
- Webhook Actions
Item → Delete Multiple
AI-generatedOverview
This node operation deletes multiple items from a specified collection in a Directus database. It is useful when you need to remove several records at once by providing their primary keys. For example, you can delete multiple articles or products by specifying their IDs in an array.
Use Case Examples
- Deleting multiple articles from the 'articles' collection by providing an array of article IDs to be deleted.
- Removing several user records from a 'users' collection by specifying their primary keys.
Properties
| Name | Meaning |
|---|---|
| Collection Name | Specifies the unique name of the parent collection from which items will be deleted. This is a required field and the user selects from available collections. |
| Data (JSON) | An array of item primary keys representing the items to be deleted. This is a required JSON input where the user provides the IDs of the items to delete. |
Output
JSON
deletedCount- The number of items successfully deleted from the collection.collection- The name of the collection from which items were deleted.
Dependencies
- Requires connection to a Directus API instance with appropriate permissions to delete items.
Troubleshooting
- Ensure the collection name is correct and exists in the Directus instance.
- Verify that the array of primary keys is valid and that the items exist in the collection.
- Check API permissions to confirm the user has rights to delete items in the specified collection.
- Common errors include invalid collection name, malformed JSON input for item IDs, or insufficient permissions.
Links
- Directus API Documentation - Delete Items - Official documentation for deleting items in Directus collections via API.