Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Overview

This node is designed to delete a specified collection within a data management system. It is useful in scenarios where you need to programmatically remove entire collections of data, such as cleaning up unused datasets or managing dynamic content structures. For example, if you have a collection named "articles" that is no longer needed, this node can be used to delete it safely.

Properties

Name Meaning
Collection Name Unique name of the collection to delete. Options are dynamically loaded from existing collections.

Output

The output JSON typically contains information about the deletion operation's result, such as success confirmation or details about the deleted collection. The exact structure depends on the underlying API response but generally confirms whether the collection was successfully deleted.

No binary data output is expected from this operation.

Dependencies

  • Requires an active connection to the target data management system.
  • Needs appropriate API authentication credentials (e.g., an API key or token) configured in n8n to authorize deletion operations.
  • The node relies on dynamically loading available collections to present options for deletion.

Troubleshooting

  • Common Issue: Attempting to delete a collection that does not exist or has already been deleted may result in an error.
    • Resolution: Verify the collection name exists before attempting deletion.
  • Common Issue: Insufficient permissions to delete collections.
    • Resolution: Ensure the API credentials used have the necessary rights to perform delete operations.
  • Error Message: "Collection not found" or similar indicates the specified collection name is invalid.
  • Error Message: Authentication errors suggest issues with the provided API credentials.

Links and References

  • Refer to your data management system's API documentation for details on collection deletion endpoints.
  • Consult n8n documentation on setting up API credentials and using option loading methods for dynamic property values.

Discussion