Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Role → Create

AI-generated

Overview

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

  1. Creating a new role named 'Interns' with specific icon, description, and access settings by providing the role details in JSON format.
  2. 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

Discussion