Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Field → Update

AI-generated

Overview

This node updates a specific field within a collection in a Directus database. It is useful for scenarios where you need to modify the metadata, schema, or type of a field in a collection, such as updating the data type of a field or changing its schema information. For example, you might update a field's type from integer to string or add meta information to a field.

Use Case Examples

  1. Updating the 'author' field in the 'articles' collection to change its type to 'string'.
  2. Adding meta information to a field in a collection to store additional metadata.

Properties

Name Meaning
Collection The name of the collection containing the field to update.
Field Name The unique name of the field within the collection to update.
JSON/RAW Parameters Whether the update parameters are provided as JSON/RAW or via the UI key-value pairs.
Body Parameters The body parameters as JSON or RAW when JSON/RAW input is enabled.
Update Fields Additional fields to update such as meta information, schema, and type of the field.

Output

JSON

  • field - The unique name of the updated field.
  • collection - The collection name containing the updated field.
  • meta - Meta information of the updated field.
  • schema - Schema information of the updated field.
  • type - The data type of the updated field.

Dependencies

  • Directus API or service for managing collections and fields

Troubleshooting

  • Ensure the collection and field names are correct and exist in the Directus instance.
  • If using JSON/RAW parameters, validate the JSON format to avoid parsing errors.
  • Check API authentication and permissions to update fields in the specified collection.

Discussion