Skip to main content

PATCH – Delete an account (Applies to Intel Purley-based systems)

Delete an account resource for Redfish service by HTTP PATCH method and set the “UserName” of the account to empty string(“”). This method applies to Lenovo Intel Purley-based systems, as the “slots” of account are pre-populated on these systems.

Request URL

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

Request body

FieldTypeDescription
UserNameStringSet it to empty string. “”.

Response body

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

Status code

HTTP Status CodeError Message ID
500InternalError

Example

The following example is PATCH body

{
"UserName": ""
}

The following example JSON response is returned:

{
"@odata.id": "/redfish/v1/AccountService/Accounts/2",
"UserName": "",
"Enabled": false,
"Description": "This resource is used to represent an account for the manager for a Redfish implementation.",
"RoleId": "CustomRole2",
"Password": null,
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/CustomRole2"
}
},
"SNMP": {
"EncryptionProtocol": "None",
"AuthenticationProtocol": "None",
"EncryptionKeySet": false,
"EncryptionKey": null
},
"Locked": false,
"AccountTypes": [
"Redfish"
],
"@odata.type": "#ManagerAccount.v1_6_0.ManagerAccount",
"RoleId@Redfish.AllowableValues": [
"Administrator",
"Operator",
"ReadOnly",
"CustomRole2"
],
"Id": "2",
"Name": "User2",
"Oem": {
"Lenovo": {
"@odata.type": "#LenovoManagerAccount.v1_0_0.LenovoManagerAccount",
"SSHPublicKey": [
null,
null,
null,
null
]
}
},
"@odata.etag": "\"22ea0db164122f8b861444197c969a8932a05d16\""
}