Roles
Last updated
Last updated
Roles can be created during project creation flow or on the Middleware page inside the project after its deploy. User can create multiple roles that could be used throughout the project in which Roles were created.
We fetch user data based on the authorization token provided when making the request.
If the endpoint permission is set to multiple roles, a user must have any one of those roles to be able to access the data.
For example: if the endpoint permission is set to roles of "buyer" and "admin", the user that has either "buyer" or "admin" or both roles will be able to access it.
The role of the user is stored in the roles
column of the Users
table as an array of role UIDs.
To add a new role to a user, you can need to update the user object via , or APIs and include the UID of the role you would like to add to the user.
To get a list of roles and their UIDs, you need to use the Get Roles
endpoint of or .
After role creation, navigate to any endpoint and select Roles as a permission type. You will see a list of all available roles.
Role name should be 3-32 symbols length
Role name cannot have any special characters (!, @, #, etc.)
Each Role name should be unique, no duplciation