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 → Update
AI-generatedOverview
This node updates a relation in a Directus collection. It is useful for modifying the metadata or configuration of a relation field that links collections in a Directus database. For example, you can update the relation's properties such as the related collection or the field that holds the related primary key.
Use Case Examples
- Updating the 'author' relation field in a 'books' collection to change its metadata.
- Modifying relation settings between 'articles' and 'categories' collections.
Properties
| Name | Meaning |
|---|---|
| Field Name | The name of the field that holds the related primary key, matching the column name in the database. |
| Data (JSON) | A partial JSON object representing the relation to update, allowing modification of relation properties. |
| Collection Name | The unique name of the parent collection where the relation exists. |
Output
JSON
relation- The updated relation object returned after the update operation.
Dependencies
- Requires connection to a Directus API with appropriate authentication credentials.
Troubleshooting
- Ensure the 'Field Name' matches an existing relational field in the specified collection.
- The 'Data (JSON)' must be a valid partial relation object as per Directus relation schema.
- Authentication errors may occur if API credentials are missing or invalid.
Links
- Directus Relation Object Documentation - Official documentation describing the structure and properties of relation objects in Directus.