Skip to main content

PATCH – Update custom role privileges

Use the PATCH method to update properties in Role resource for Redfish service.

Request URL

PATCH https://<BMC_IPADDR>/redfish/v1/AccountService/Roles/CustomRole{N}

Request body

Properties to be updated are shown as below, all of these properties can be changed individually.

FieldTypeDescription

OemPrivileges

Array

The value of this property shall be the OEM privileges that this role includes. For pre-defined roles, this property shall be readOnly. For custom roles some implementations may not allow writing this property. The values can be

“UserAccountManagement”,

“RemoteConsoleAccess”,

“RemoteConsoleAndVirtualMediaAccess”,

“RemoteServerPowerRestartAccess”,

“AbilityClearEventLogs”,

“Configuration_Basic”,

“Configuration_NetworkingAndSecurity”,

“Configuration_Advanced”,

“Configuration_UEFISecurity”

Response

The response returns same content as GET operation with updated properties.

Status code

HTTP Status CodeError Message ID
500InternalError

Example

The following example is PATCH body.

{
"OemPrivileges" : [
" RemoteConsoleAccess "
]
}

The following example JSON response is returned:

{
"IsPredefined": false,
"Id": "CustomRole12",
"AssignedPrivileges": [
"Login"
],
"Name": "CustomRole12",
"RoleId": "CustomRole12",
"@odata.type": "#Role.v1_2_4.Role",
"OemPrivileges": [
"RemoteConsoleAccess"
],
"@odata.id": "/redfish/v1/AccountService/Roles/CustomRole12",
"@odata.etag": "\"7465e9c5393c1fbc1da204d67d854889\"",
"OemPrivileges@Redfish.AllowableValues": [
"UserAccountManagement",
"RemoteConsoleAccess",
"RemoteConsoleAndVirtualMediaAccess",
"RemoteServerPowerRestartAccess",
"AbilityClearEventLogs",
"Configuration_Basic",
"Configuration_NetworkingAndSecurity",
"Configuration_Advanced",
"Configuration_UEFISecurity"
],
"Description": "This resource is used to represent a user role for the user account for a Redfish implementation."
}