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 → Get
AI-generatedOverview
This node retrieves relational data from a specified collection in a Directus database. It is useful for scenarios where you need to fetch related records based on a relational field, such as getting related authors for books or related categories for products.
Use Case Examples
- Fetching related authors for a book collection by specifying the 'author' field as the relational key.
- Retrieving related categories for a product collection by specifying the appropriate relational field.
Properties
| Name | Meaning |
|---|---|
| Collection Name | Unique name of the parent collection from which to retrieve relational data. |
| Field Name | Name of the field that holds the related primary key, matching the column name in the database. |
Output
JSON
relationData- The retrieved relational data from the specified collection and field.
Dependencies
- Requires connection to a Directus API instance with appropriate authentication credentials.
Troubleshooting
- Ensure the collection name is correct and exists in the Directus instance.
- Verify the field name is a valid relational field in the specified collection.
- Check API authentication credentials if the node fails to connect or retrieve data.
- Common errors include 'Collection not found' or 'Field not found' which indicate incorrect input values.
Links
- Directus API Documentation - Official documentation for Directus API endpoints and usage.