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
User → Update
AI-generatedOverview
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
- Update a user's title by providing their ID and a JSON object with the new title.
- 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 useremail- The email address of the updated userfirst_name- The first name of the updated userlast_name- The last name of the updated usertitle- The job title of the updated userstatus- 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
- Directus User Object Documentation - Reference for the user object structure and fields that can be updated via the API