Skip to main content

User role

In Qvalon system, each user has his own set of roles that provide them with access to one or another functionality.

View a list of available roles

All endpoints on this page manage a user's report roles specifically (the roles that control which reports a user can see) โ€” not the user's full set of permissions. Other roles (e.g. general permission roles like ROLE_SUPERVISOR) are not affected by these endpoints.

Get user roles#

Returns the user's report roles, each with its name and description.

Request parameters:

Request ParameterTypeDescriptionRequired
reportBooleanWhen set, filters to only report rolesfalse

Examples

curl https://api.qvalon.com/v1/orgstruct/users/1615/roles \
--header 'Authorization: Bearer <your_token>'
200 OK
[
{
"name": "DISK_VIEWER",
"description": "View and download files in My Disk"
},
{
"name": "CALL_ENABLED",
"description": "Access to calls"
},
{
"name": "REPORT_TASKS",
"description": "Tasks report"
}
]

Get user role names#

Same as Get user roles, but returns just the role names, without descriptions.

Request parameters:

Request ParameterTypeDescriptionRequired
reportBooleanWhen set, filters to only report rolesfalse

Examples

curl https://api.qvalon.com/v1/orgstruct/users/1615/roles/names \
--header 'Authorization: Bearer <your_token>'
200 OK
[
"DISK_VIEWER",
"CALL_ENABLED",
"REPORT_TASKS"
]

Get user role sources#

Same as Get user roles, but each role also has assignedDirectly โ€” whether the role was assigned to the user directly (as opposed to inherited some other way, e.g. through a group).

Request parameters:

Request ParameterTypeDescriptionRequired
reportBooleanWhen set, filters to only report rolesfalse

Examples

curl https://api.qvalon.com/v1/orgstruct/users/1615/roles/sources \
--header 'Authorization: Bearer <your_token>'
200 OK
[
{
"name": "DISK_VIEWER",
"description": "View and download files in My Disk",
"assignedDirectly": true
},
{
"name": "CALL_ENABLED",
"description": "Access to calls",
"assignedDirectly": true
},
{
"name": "REPORT_TASKS",
"description": "Tasks report",
"assignedDirectly": true
}
]

Add roles to user#

Adds report roles to the user, in addition to the ones already assigned.

Request body:

AttributeTypeDescriptionNullable
(body)List of stringsThe request body is a plain JSON array of role names to addfalse

Examples

curl --request POST https://api.qvalon.com/v1/orgstruct/users/1615/roles \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '["REPORT_TASKS","REPORT_MBI"]'
200 OK
{}

Replace user roles#

Replaces the user's report roles with the given ones. Roles not in the list are removed; roles already present are left as is.

Request body:

AttributeTypeDescriptionNullable
(body)List of stringsThe request body is a plain JSON array of role names the user should end up withfalse

Examples

curl --request PUT https://api.qvalon.com/v1/orgstruct/users/1615/roles \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '["REPORT_TASKS"]'
200 OK
{}

Remove user roles#

Removes the given report roles from the user; other roles are left as is.

Request body:

AttributeTypeDescriptionNullable
(body)List of stringsThe request body is a plain JSON array of role names to removefalse

Examples

curl --request DELETE https://api.qvalon.com/v1/orgstruct/users/1615/roles \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '["REPORT_MBI"]'
200 OK
{}

Remove all user roles#

Removes all report roles from the user. Other (non-report) roles are not affected.

Examples

curl --request DELETE https://api.qvalon.com/v1/orgstruct/users/1615/roles/all \
--header 'Authorization: Bearer <your_token>'
200 OK
{}