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

Code Returns Type
200 OK Acos.Websak.UserAPI.Core.Controllers.UsersController+UserRoleResponse[]
404 Not Found
500 Internal Server Error
401 Unauthorized - Missing or invalid access token
403 Forbidden - Provided access token does not permit usage of this API or data
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

Code Returns Type
201 Created Acos.Websak.UserAPI.Core.Controllers.UsersController+UserRoleResponse
400 Bad Request
404 Not Found
409 Conflict
500 Internal Server Error
401 Unauthorized - Missing or invalid access token
403 Forbidden - Provided access token does not permit usage of this API or data
Response Example
{ 
        
        "roleId":"string",
        "userId":"string",
        "departmentList":"string",
        "archiveList":"string",
        "journalUnitList":"string",
        "gradeList":"string",
        "id":"string",
        "description":"string"
}