GET /api/users/{userid}/roles
Returns all roles assigned to the specified user.
Parameters
| Name |
In |
Description |
Required |
Type |
| userId |
path |
User identifier (GID unless lookupField provided). |
true |
string |
| lookupField |
query |
Lookup field. Possible values: Id (default) and Code. |
|
string |
Responses
Response Example
[{
"roleId":"string",
"userId":"string",
"departmentList":"string",
"archiveList":"string",
"journalUnitList":"string",
"gradeList":"string",
"id":"string",
"description":"string"
}]
POST /api/users/{userid}/roles
Adds a role to the specified user.
Parameters
| Name |
In |
Description |
Required |
Type |
| userId |
path |
User identifier (GID unless lookupField provided). |
true |
string |
| lookupField |
query |
Lookup field. Possible values: Id (default) and Code. |
|
string |
Request body
{
"id":"string",
"departmentList":"string",
"archiveList":"string",
"journalUnitList":"string",
"gradeList":"string"
}
Responses
Response Example
{
"roleId":"string",
"userId":"string",
"departmentList":"string",
"archiveList":"string",
"journalUnitList":"string",
"gradeList":"string",
"id":"string",
"description":"string"
}