Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Role → Update

AI-generated

Overview

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

  1. Update the icon of a role by providing the role ID and a JSON object with the new icon value.
  2. 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

Discussion