Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Setting → Get

AI-generated

Overview

This node operation retrieves settings from a Directus API. It supports flexible querying options, including JSON/RAW parameters or UI-based key-value pairs, allowing users to specify query parameters, filters, sorting, grouping, and aggregation functions. It is useful for scenarios where detailed and customized retrieval of settings data is required, such as fetching configuration details with specific filters or exporting the data in various formats (CSV, JSON, XML).

Use Case Examples

  1. Fetch settings with specific filters and sorting to display in a dashboard.
  2. Export settings data as a CSV file for reporting purposes.
  3. Retrieve aggregated statistics on settings values grouped by certain fields.

Properties

Name Meaning
JSON/RAW Parameters Whether the query parameters should be set via JSON/RAW input or UI key-value pairs.
Query Parameters Query parameters as a JSON object when JSON/RAW input is enabled.
Additional Fields Additional query options such as aggregation functions, export settings, filtering, sorting, grouping, and pagination.

Output

Binary

Contains exported data in the specified format (CSV, JSON, XML) if export option is used.

JSON

  • settings - The retrieved settings data from the Directus API, potentially filtered, grouped, or aggregated based on input parameters.
  • exportedFile - Binary data of the exported file if export option is enabled.

Dependencies

  • Directus API authentication credentials

Troubleshooting

  • Ensure the Directus API credentials are correctly configured to avoid authentication errors.
  • Verify the JSON syntax in the Query Parameters and Filter fields to prevent parsing errors.
  • Check that the specified fields for aggregation and grouping exist in the settings collection to avoid invalid query errors.
  • If exporting data, ensure the binary property name is unique and does not conflict with other node outputs.

Links

Discussion