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
Relation → Delete
AI-generatedOverview
This node deletes a relation in a Directus collection. It is useful when you want to remove a relational link between collections in a Directus database, such as deleting a foreign key relationship or a related field entry. For example, if you have a 'books' collection with an 'author' field that relates to an 'authors' collection, this node can delete that relation.
Use Case Examples
- Deleting a relation between 'books' and 'authors' collections by specifying the collection name 'books' and the relational field 'author'.
- Removing a relational field from a collection to clean up database schema or update relationships.
Properties
| Name | Meaning |
|---|---|
| Collection Name | Unique name of the parent collection where the relation exists. This is required to identify which collection's relation is to be deleted. |
| Field Name | Name of the field that holds the related primary key in the collection. This matches the column name in the database and specifies which relation to delete. |
Output
JSON
success- Indicates whether the relation deletion was successful.
Dependencies
- Requires connection to a Directus API instance with appropriate permissions to delete relations.
Troubleshooting
- Ensure the collection name and field name are correctly specified and exist in the Directus instance.
- Check API permissions to confirm the user has rights to delete relations.
- Common errors include 'Relation not found' if the specified field does not exist or 'Permission denied' if the API credentials lack delete rights.
Links
- Directus API Relations Documentation - Official documentation for managing relations in Directus via API.