Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Preset → Create

AI-generated

Overview

This node creates a new preset object in the Directus system. It is useful for automating the creation of user-specific presets such as layout preferences or search filters in Directus. For example, it can be used to programmatically set up a user's dashboard layout or save search criteria for repeated use.

Use Case Examples

  1. Creating a preset for a user with a specific layout and search filter.
  2. Automating the setup of default presets for new users in Directus.

Properties

Name Meaning
Data (JSON) A partial preset object in JSON format that defines the properties of the preset to be created, such as user ID, layout, and search criteria.

Output

JSON

  • id - The unique identifier of the created preset.
  • user - The user ID associated with the preset.
  • layout - The layout setting of the preset.
  • search - The search filter or criteria saved in the preset.

Dependencies

  • Directus API access with appropriate permissions to create presets.

Troubleshooting

  • Ensure the JSON data provided is valid and matches the expected structure of a preset object.
  • Verify that the user ID specified in the preset data exists in the Directus system.
  • Check API permissions to confirm the node has rights to create presets.
  • Common error messages may include validation errors if required fields are missing or malformed, or authorization errors if the API credentials lack necessary permissions.

Links

Discussion