Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Preset → Update Multiple

AI-generated

Overview

This node operation updates multiple preset records in a Directus system. It is useful when you need to modify several presets at once, such as changing the layout or other properties for a batch of presets identified by their primary keys. For example, you can update the layout of multiple presets from 'grid' to 'tabular' in a single operation.

Use Case Examples

  1. Updating the layout property of multiple presets by specifying their keys and the new layout value in the data JSON.
  2. Batch updating several preset records to change their configuration settings.

Properties

Name Meaning
Data (JSON) A JSON object containing two required fields: 'keys', an array of primary keys of the presets to update, and 'data', an object with the properties of the preset to be updated.

Output

JSON

  • updatedCount - Number of presets successfully updated.
  • updatedKeys - Array of primary keys of the presets that were updated.

Dependencies

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

Troubleshooting

  • Ensure the 'keys' array contains valid primary keys of existing presets; invalid keys will cause update failures.
  • The 'data' object must conform to the preset object schema as defined by Directus; invalid or unsupported properties may cause errors.
  • Authentication errors may occur if API credentials are missing or invalid; verify API key or token configuration.

Links

Discussion