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
Role → Update
AI-generatedOverview
This node updates an existing role in the Directus system by specifying the role's primary key (ID) and providing partial role data in JSON format. It is useful for modifying role attributes such as permissions or icons without needing to replace the entire role object. For example, updating the icon of a role to 'attractions'.
Use Case Examples
- Update the icon of a role by providing the role ID and a JSON object with the new icon value.
- Modify role permissions by sending a partial role object with updated permission fields.
Properties
| Name | Meaning |
|---|---|
| Data (JSON) | A partial role object in JSON format containing the fields to update for the role. This is required for the update operation. |
| ID | The primary key of the role to update. This identifies which role will be modified. |
Output
JSON
id- The unique identifier of the updated role.name- The name of the updated role.icon- The icon associated with the updated role.description- The description of the updated role.permissions- The permissions assigned to the updated role.
Dependencies
- Directus API with appropriate authentication credentials
Troubleshooting
- Ensure the provided role ID exists in the Directus system; otherwise, the update will fail.
- Validate the JSON data format to avoid syntax errors or invalid fields.
- Check API authentication credentials to ensure the node has permission to update roles.
Links
- Directus Role Object Documentation - Reference for the structure and fields of a role object in Directus.