Skip to main content

PATCH – Create a custom role (Applies to Intel Purley-based systems)

Use the PATCH method to create a custom role for Redfish service. This method applies to Lenovo Intel Purley-based systems.

Request URL

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

Request body

FieldTypeDescription

OemPrivileges

Array

String

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",
"RemoteConsoleAndVirtualMediaAccess",
"RemoteServerPowerRestartAccess"
]
}

The following example JSON response is returned:

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