Skip to main content

PATCH – Delete a Role (Applies to Intel Purley-based systems)

Delete a role resource for Redfish service by HTTP PATCH method and set the “OemPrivileges” of the role to default oem privilege(“ReadOnly”). This method applies to Lenovo Intel Purley-based systems, as the “slots” of role are pre-populated on these systems.

Request URL

PATCH https://<BMC_IPADDR>/redfish/v1/AccountService/Accounts/{1...12}

Request body

FieldTypeDescription
OemPrivileges

Array

String

Set it to default oem privilege, “ReadOnly”.

[“ReadOnly”]

Response

The response returns the same content as GET operation on an empty role “slot”.

Status code

HTTP Status CodeError Message ID
500InternalError

Example

The following example is PATCH body.

{
"OemPrivileges": ["ReadOnly"]
}

The following example JSON response is returned:

{
"@odata.etag": "\"5b0d772c16cd27ed99a\"",
"Description": "This resource is used to represent a user role for the user account for a Redfish implementation.",
"AssignedPrivileges": [
"Login"
],
"IsPredefined": false,
"RoleId": "CustomRole4",
"@odata.id": "/redfish/v1/AccountService/Roles/CustomRole4",
"Id": "CustomRole4",
"Name": "CustomRole4",
"@odata.type": "#Role.v1_2_4.Role",
"OemPrivileges@Redfish.AllowableValues": [
"Supervisor",
"ReadOnly",
"UserAccountManagement",
"RemoteConsoleAccess",
"RemoteConsoleAndVirtualMediaAccess",
"RemoteServerPowerRestartAccess",
"AbilityClearEventLogs",
"AdapterConfiguration_Basic",
"AdapterConfiguration_NetworkingAndSecurity",
"AdapterConfiguration_Advanced"
],
"OemPrivileges": [
"ReadOnly"
]
}