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
Permission → Update
AI-generatedOverview
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
- Updating a permission rule to change the allowed fields for a user role.
- 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 ruledata- 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
- Directus Permission Object Documentation - Details on the structure and fields of permission objects in Directus API