PATCH – Create an account (Applies to Intel Purley-based systems)
Create an account resource for Redfish service by HTTP PATCH method at an “empty slot” of account array. This method applies to Lenovo Intel Purley-based systems, as the “slots” of account are pre-populated on these systems. In “empty slot”, the value of property “UserName” is empty string. NOTE: Before creating an account, please make sure the new account name and password follow the rules in AccountService, such as length, password complexity, changing interval, etc.
Request URL
PATCH https://<BMC_IPADDR>/redfish/v1/AccountService/Accounts/{1...12}
Request body
The request body is the same as 4.2.3.
Response body
The response returns same content as GET operation with updated properties.
Status code
HTTP Status Code | Error Message ID |
---|---|
500 | InternalError |
Example
The following example is PATCH body
{
"UserName": "TempUser",
"Password": "Passw0rd4U",
"RoleId": "Administrator",
"SNMP": {
"AuthenticationProtocol": "HMAC_SHA96",
"EncryptionKey": "snmpPassw0rd",
"EncryptionProtocol": "CFB128_AES128"
}
}
The following example JSON response is returned:
{
"Oem": {
"Lenovo": {
"@odata.type": "#LenovoManagerAccount.v1_0_0.LenovoManagerAccount",
"SSHPublicKey": [
null,
null,
null,
null
]
}
},
"Description": "This resource is used to represent an account for the manager for a Redfish implementation.",
"RoleId@Redfish.AllowableValues": [
"Administrator",
"Operator",
"ReadOnly",
"CustomRole2"
],
"UserName": "TempUser",
"Id": "2",
"Name": "User2",
"AccountTypes": [
"Redfish"
],
"@odata.id": "/redfish/v1/AccountService/Accounts/2",
"RoleId": "Administrator",
"Locked": false,
"@odata.etag": "\"d9e5633a7024f737e544883bbd1c5cc332a05d16\"",
"SNMP": {
"AuthenticationProtocol": "HMAC_SHA96",
"EncryptionProtocol": "CFB128_AES128",
"EncryptionKey": null,
"EncryptionKeySet": true
},
"Enabled": false,
"@odata.type": "#ManagerAccount.v1_6_0.ManagerAccount",
"Password": null,
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
}
}
Give feedback