Directus icon

Directus

Consume Directus API

Overview

This node integrates with the Directus API, allowing users to interact with various Directus resources programmatically. Specifically, for the Extensions resource with the List operation, it fetches a list of extensions of a specified type from a Directus instance.

Typical use cases include:

  • Retrieving all available UI extensions such as displays, interfaces, layouts, or modules installed in a Directus project.
  • Automating workflows that depend on the presence or configuration of certain Directus extensions.
  • Auditing or monitoring the extensions currently active in a Directus environment.

For example, you might use this node to list all "Displays" extensions to dynamically generate UI components or to verify which custom modules are installed before deploying updates.

Properties

Name Meaning
Type The category of extensions to list. Options: Displays, Interfaces, Layouts, Modules.
Split Into Items Whether to output each extension as a separate item (true) or as a single array (false).

Output

The node outputs JSON data representing the list of extensions retrieved from the Directus API under the json field.

  • If Split Into Items is set to false, the output will be a single item containing an array of extension objects.
  • If Split Into Items is true, each extension object is output as a separate item.

Each extension object contains details about the extension, such as its identifier, name, type, and other metadata provided by the Directus API.

No binary data output is involved in this operation.

Dependencies

  • Requires a valid connection to a Directus instance via an API key credential or equivalent authentication token configured in n8n.
  • The node uses the Directus REST API endpoint /extensions/{type} where {type} corresponds to the selected extension type.
  • No additional external dependencies beyond the Directus API and proper credentials.

Troubleshooting

  • Authentication errors: Ensure the API key or authentication token is valid and has sufficient permissions to access the extensions endpoint.
  • Invalid type parameter: The Type property must be one of the supported options (displays, interfaces, layouts, modules). Using an unsupported value will cause the API request to fail.
  • Empty results: If no extensions are returned, verify that the Directus instance actually has extensions of the requested type installed.
  • API rate limits or network issues: Network connectivity problems or API rate limiting can cause failures; check connectivity and retry policies.
  • JSON parsing errors: If using advanced query parameters or JSON inputs elsewhere, ensure they are correctly formatted.

If the node throws errors, enabling "Continue On Fail" can help capture error messages in the output for debugging.

Links and References


This summary focuses on the Extensions resource's List operation as requested, based on static analysis of the node's execute method and provided properties.

Discussion