Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Permission → Update

AI-generated

Overview

This node updates a permission rule in the Directus system. It is useful for modifying existing permission settings by specifying the permission's primary key and providing the updated data in JSON format. For example, you can update the fields or conditions of a permission rule to change access controls dynamically.

Use Case Examples

  1. Updating a permission rule to change the allowed fields for a user role.
  2. Modifying the conditions of a permission to restrict or grant access to certain data.

Properties

Name Meaning
ID Primary key of the permission rule to update
Data (JSON) Partial permission object in JSON format containing the fields to update

Output

JSON

  • id - The ID of the updated permission rule
  • data - The updated permission object returned from the API

Dependencies

  • Directus API with appropriate authentication

Troubleshooting

  • Ensure the ID provided corresponds to an existing permission rule; otherwise, the update will fail.
  • The JSON data must be a valid partial permission object as per Directus API specifications; invalid JSON or incorrect fields will cause errors.
  • Authentication issues with the Directus API can prevent successful updates; verify API credentials and permissions.

Links

Discussion