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 → Create
AI-generatedOverview
This node creates a new role in the Directus system using the provided JSON data. It is useful for automating the management of user roles, such as adding new roles with specific permissions and access settings in a Directus project.
Use Case Examples
- Creating a new role named 'Interns' with specific icon, description, and access settings by providing the role details in JSON format.
- Automating role creation during project setup or user management workflows.
Properties
| Name | Meaning |
|---|---|
| Data (JSON) | A partial role object in JSON format that defines the properties of the new role to be created, such as name, icon, description, admin access, and app access. |
Output
JSON
id- The unique identifier of the newly created role.name- The name of the newly created role.icon- The icon associated with the role.description- The description of the role, if provided.admin_access- Boolean indicating if the role has admin access.app_access- Boolean indicating if the role has app access.
Dependencies
- Directus API with appropriate authentication credentials
Troubleshooting
- Ensure the JSON data provided is valid and matches the expected structure of a role object in Directus.
- Check that the API credentials have sufficient permissions to create roles.
- Common errors include validation errors if required fields are missing or if the data types do not match the expected schema.
Links
- Directus Role Object Documentation - Official documentation describing the role object structure and properties in Directus API.