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
[ {
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true
} ]
Create a new role.
media type | data type | description |
---|---|---|
application/json | AppUserRoleRequest (JSON) | specify data for new role |
media type | data type | description |
---|---|---|
application/json | AppUserRoleDetails (JSON) | details of newly created user |
POST /roles
Content-Type: application/json
Accept: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "STORAGE_INFRASTRUCTURE_READ", "MGMT_PASSWORD_CHANGE" ],
"privilegeContexts" : [ {
"type" : "CLOUD_USER",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "APP_CMD_EXEC_CONFIG",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ],
"isRootAccess" : true
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "STORAGE_INFRASTRUCTURE_WRITE", "VE_INSTANCE_MOUNT_TASK_REGISTER" ],
"isRootAccess" : true,
"privilegeContexts" : [ {
"type" : "APP_CMD_EXEC_CONFIG",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "STORAGE",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ]
}
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 | AppUserRoleDetails (JSON) | a single role details |
GET /roles/{guid}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "OS_BACKUP_SLA_READ", "OS_REPORTING_SEND_EMAIL" ],
"isRootAccess" : true,
"privilegeContexts" : [ {
"type" : "HYPERVISOR_MANAGER",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "APPLICATION",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ]
}
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 | AppUserRoleDetails (JSON) | updated details of role |
PUT /roles/{guid}
Content-Type: application/json
Accept: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "VE_BACKUP_SLA_WRITE", "OS_INSTANCE_WRITE" ],
"privilegeContexts" : [ {
"type" : "DATA_CENTER",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "DATA_CENTER",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ],
"isRootAccess" : true
}
HTTP/1.1 204 No Content
Content-Type: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "VE_INFRASTRUCTURE_WRITE", "APP_REPORTING_VIEW" ],
"isRootAccess" : true,
"privilegeContexts" : [ {
"type" : "ROOT",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "STORAGE_POOL",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ]
}
name | type | description |
---|---|---|
guid | path |
media type | data type |
---|---|
application/json | CloneDTO (JSON) |
media type | data type | description |
---|---|---|
application/json | AppUserRoleDetails (JSON) |
POST /roles/{guid}/clone
Content-Type: application/json
Accept: application/json
{
"name" : "..."
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "TASK_WRITE", "APP_REPORTING_VIEW" ],
"isRootAccess" : true,
"privilegeContexts" : [ {
"type" : "CLOUD_TEAM",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "STORAGE",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ]
}
Add context to role
name | type | description |
---|---|---|
guid | path | specify role guid |
media type | data type | description |
---|---|---|
application/json | PrivilegeContextRequest (JSON) | specify privilege request to be added to role |
media type | data type | description |
---|---|---|
application/json | AppUserRoleDetails (JSON) | updated details of role |
PUT /roles/{guid}/contexts/add
Content-Type: application/json
Accept: application/json
{
"type" : "OS_AGENT",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}
HTTP/1.1 204 No Content
Content-Type: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "VE_RECOVERYPLAN_SLA_READ", "STORAGE_INSTANCE_EXPORT_TASK_REGISTER" ],
"isRootAccess" : true,
"privilegeContexts" : [ {
"type" : "VIRTUAL_ENVIRONMENT",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "VIRTUAL_ENVIRONMENT",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ]
}
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 |
media type | data type | description |
---|---|---|
application/json | AppUserRoleDetails (JSON) | updated details of role |
PUT /roles/{guid}/contexts/remove
Content-Type: application/json
Accept: application/json
{
"value" : "..."
}
HTTP/1.1 204 No Content
Content-Type: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "VE_BACKUP_SLA_WRITE", "STORAGE_REPORTING_VIEW" ],
"isRootAccess" : true,
"privilegeContexts" : [ {
"type" : "STORAGE_POOL",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "STORAGE_PROVIDER",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ]
}
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 |
media type | data type | description |
---|---|---|
application/json | AppUserRoleDetails (JSON) | updated details of role |
PUT /roles/{guid}/privileges/add
Content-Type: application/json
Accept: application/json
{
"value" : "..."
}
HTTP/1.1 204 No Content
Content-Type: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "OS_INSTANCE_IMPORT_TASK_REGISTER", "STORAGE_INSTANCE_RESTORE_TO_NODE_TASK_REGISTER" ],
"isRootAccess" : true,
"privilegeContexts" : [ {
"type" : "CLOUD_SERVICE_PROVIDER",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "STORAGE_POOL",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ]
}
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 |
media type | data type | description |
---|---|---|
application/json | AppUserRoleDetails (JSON) | updated details of role |
PUT /roles/{guid}/privileges/remove
Content-Type: application/json
Accept: application/json
{
"value" : "..."
}
HTTP/1.1 204 No Content
Content-Type: application/json
{
"guid" : "...",
"name" : "...",
"description" : "...",
"deletable" : true,
"privileges" : [ "OS_BACKUP_SLA_READ", "OS_INSTANCE_EXPORT_TASK_REGISTER" ],
"isRootAccess" : true,
"privilegeContexts" : [ {
"type" : "APPLICATION",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
}, {
"type" : "CLOUD_GROUP",
"instanceGuid" : "...",
"instanceUuid" : "...",
"instanceName" : "..."
} ]
}