# Get user role
This endpoint retrieves the details of a given role.
Method | Path | Operation* |
---|---|---|
GET | /roles/{role} | get_user_role |
*
In order for a user to perform the "get_user_role" operation, the "get_user_role" permission must be included in the list of allowed actions in the statement of the user's role.
# Request
Parameter | Type | In | Description |
---|---|---|---|
{role} required | string | path | Role UUID. |
In our example, we send a request to retrieve the role with the role UUID "3d4c3ec0-6c5f-4d32-ab23-4df8c69f142c"
.
# Response
Attribute | Type | Description |
---|---|---|
uuid | string | Role UUID. |
name | string | Name of the role. It must match the regular expression(opens new window) ^[0-9A-Za-z][0-9A-Za-z_ \-]{0,30}[0-9A-Za-z]$ . It does not need to be unique in the context of the account. |
account | string | Account UUID. |
rules | dictionary | Access rules that control access to a "twin" , an "entry" or an "identity" . If a rule evaluates to True , it allows to access the given resource. |
statement | dictionary | Lists |
actions | list | List of actions that we grant the user with the role the permission to perform. For a list of available actions, please consult the Available actions section. |
In our example, the response returns the details of the role with the role UUID "3d4c3ec0-6c5f-4d32-ab23-4df8c69f142c"
.
# Status codes
Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status codes section.
Was this article helpful?