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
Preset → Create
AI-generatedOverview
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
- Creating a preset for a user with a specific layout and search filter.
- 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
- Directus Preset Object Documentation - Official documentation describing the structure and usage of preset objects in Directus.