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:

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