Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

User → Update

AI-generated

Overview

This node updates a user in the Directus system by specifying the user's primary key (ID) and providing partial user data in JSON format. It is useful for modifying user details such as title, email, or other user attributes without replacing the entire user object. For example, updating a user's job title or contact information.

Use Case Examples

  1. Update a user's title by providing their ID and a JSON object with the new title.
  2. Modify user attributes like email or role by specifying the user ID and partial user data in JSON format.

Properties

Name Meaning
ID Primary key of the user to update, used to identify which user record to modify
Data (JSON) Partial user object in JSON format containing the fields and values to update for the specified user

Output

JSON

  • id - The unique identifier of the updated user
  • email - The email address of the updated user
  • first_name - The first name of the updated user
  • last_name - The last name of the updated user
  • title - The job title of the updated user
  • status - The status of the updated user (e.g., active, inactive)

Dependencies

  • Directus API endpoint and authentication credentials

Troubleshooting

  • Ensure the provided user ID exists in the Directus system; otherwise, the update will fail with a 'user not found' error.
  • Validate the JSON data format to avoid syntax errors or invalid fields that the Directus API does not accept.
  • Check API authentication credentials to ensure the node has permission to update user data.

Links

Discussion