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
Collection → Delete
AI-generatedOverview
This node deletes a specified collection in the Directus system. It is useful for scenarios where you need to programmatically remove entire collections of data, such as cleaning up unused or obsolete collections in a database. For example, if you have a collection named 'articles' that is no longer needed, this node can delete it by specifying the collection name.
Use Case Examples
- Deleting a collection named 'articles' to remove all associated data and schema from the Directus database.
- Automating cleanup of test collections created during development by deleting them after tests complete.
Properties
| Name | Meaning |
|---|---|
| Collection Name | Unique name of the collection to be deleted |
Output
JSON
success- Indicates whether the collection was successfully deleted (true/false)message- Additional information or error message related to the deletion operation
Dependencies
- Directus API authentication token or credentials
Troubleshooting
- Ensure the collection name provided exists; otherwise, the deletion will fail with an error.
- Verify that the API credentials have sufficient permissions to delete collections.
- Common error messages include 'Collection not found' if the name is incorrect, or 'Permission denied' if the credentials lack delete rights.
Links
- Directus API Documentation - Delete Collection - Official documentation for deleting collections in Directus via API.