Return list of roles.
| name | type | description |
|---|---|---|
| direction | query | |
| filter | query | |
| nameLike | query | |
| orderBy | query | |
| page | query | |
| size | query |
| media type | data type | description |
|---|---|---|
| application/json | array of AppUserRoleListRecord (JSON) | list of roles |
GET /roles
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
[ { } ]
Create a new role. * @param request specify role details to create
| media type | data type |
|---|---|
| application/json | AppUserRoleRequest (JSON) |
| media type | data type | description |
|---|---|---|
| application/json | AppUserRoleGuidNameDto (JSON) | details of newly created user |
POST /roles
Content-Type: application/json
Accept: application/json
{
"privilegeContexts" : [ { }, { } ]
}
HTTP/1.1 201 Created
Content-Type: application/json
{ }
Remove role.
| name | type | description |
|---|---|---|
| guid | path | specify local unique identifier for role (use by vProtect) |
DELETE /roles/{guid}
Content-Type: */*
...
HTTP/1.1 204 No Content
Get a single role.
| name | type | description |
|---|---|---|
| guid | path | specify local unique identifier for role (use by vProtect) |
| media type | data type | description |
|---|---|---|
| application/json | AppUserRoleDetailsDto (JSON) | a single role details |
GET /roles/{guid}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{ }
Change role details.
| name | type | description |
|---|---|---|
| guid | path |
| media type | data type | description |
|---|---|---|
| application/json | AppUserRoleRequest (JSON) | specify role details to update |
| media type | data type | description |
|---|---|---|
| application/json | AppUserRoleGuidNameDto (JSON) | updated details of role |
PUT /roles/{guid}
Content-Type: application/json
Accept: application/json
{
"privilegeContexts" : [ { }, { } ]
}
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
| name | type | description |
|---|---|---|
| guid | path |
| media type | data type |
|---|---|
| application/json | CloneDTO (JSON) |
| media type | data type | description |
|---|---|---|
| application/json | AppUserRoleCloneResponseDto (JSON) |
POST /roles/{guid}/clone
Content-Type: application/json
Accept: application/json
{ }
HTTP/1.1 201 Created
Content-Type: application/json
{ }
| name | type | description |
|---|---|---|
| guid | path |
| media type | data type | description |
|---|---|---|
| application/json | array of PrivilegeContextRoleRecordDto (JSON) |
GET /roles/{guid}/contexts
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
[ { } ]
Add context to role
| name | type | description |
|---|---|---|
| guid | path | specify role guid |
| media type | data type | description |
|---|---|---|
| application/json | LegacyPrivilegeContextRequest (JSON) | specify privilege request to be added to role |
| media type | data type | description |
|---|---|---|
| application/json | PrivilegeContextCreationResponseDto (JSON) | updated details of role |
PUT /roles/{guid}/contexts/add
Content-Type: application/json
Accept: application/json
{ }
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
Remove context from role.
| name | type | description |
|---|---|---|
| guid | path | specify role |
| media type | data type | description |
|---|---|---|
| application/json | StringDTO (JSON) | specify context to remove from role |
PUT /roles/{guid}/contexts/remove
Content-Type: application/json
{ }
HTTP/1.1 204 No Content
Add context to role
| name | type | description |
|---|---|---|
| guid | path | specify role guid |
| media type | data type | description |
|---|---|---|
| application/json | StringDTO (JSON) | specify dto with privilege to add to role |
PUT /roles/{guid}/privileges/add
Content-Type: application/json
{ }
HTTP/1.1 204 No Content
Add context to role
| name | type | description |
|---|---|---|
| guid | path | specify role guid |
| media type | data type | description |
|---|---|---|
| application/json | StringDTO (JSON) | specify dto with privilege to remove from role |
PUT /roles/{guid}/privileges/remove
Content-Type: application/json
{ }
HTTP/1.1 204 No Content