Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Relation → List

AI-generated

Overview

This node operation lists relations for a specified parent collection in a Directus environment. It is useful for retrieving metadata about how collections are related to each other, which can help in understanding data structure or for further processing in workflows. For example, a user might list relations of an 'articles' collection to see linked authors or categories.

Use Case Examples

  1. List all relations of the 'articles' collection to understand its linked data.
  2. Retrieve relations to dynamically build UI elements based on related collections.

Properties

Name Meaning
Collection Name Specifies the unique name of the parent collection whose relations are to be listed.
Split Into Items Determines whether to output each element of an array as its own separate item in the workflow output.

Output

JSON

  • relations - An array of relation objects associated with the specified parent collection.

Dependencies

  • Requires connection to a Directus API instance with appropriate authentication credentials.

Troubleshooting

  • Ensure the 'Collection Name' is correctly specified and exists in the Directus instance to avoid errors.
  • If no relations are returned, verify that the collection has defined relations in Directus.
  • Authentication errors may occur if API credentials are missing or invalid; ensure proper API key or token is configured.

Links

Discussion