POST – Create an account
Create an account resource for Redfish service by HTTP POST method. This method applies to Lenovo Intel Whitley-based systems and AMD 2 sockets systems.
Request URL
POST https://<BMC_IPADDR>/redfish/v1/AccountService/Accounts
Request body
Field | Type | Description | |
---|---|---|---|
UserName | String | The new account name. | |
Enabled | Boolean | Indicates if this account is enabled. | |
Password | String | The new account password. | |
RoleId | String | Role ID for new account. | |
PasswordChangeRequired | Boolean | If need to change password when the first login. | |
SNMP | Object | Expand | |
AuthenticationProtocol | String | This value indicates authentication conforms to the authentication protocol. | |
EncryptionKey | String | The secret authentication key for SNMPv3. | |
EncryptionProtocol | String | The value indicates encryption conforms to the encryption protocol. |
Response body
The response returns the same content as GET operation with updated properties.
Status code
HTTP Status Code | Error Message ID |
---|---|
500 | InternalError |
Example
The following example is POST body
{
"UserName": "TempUser",
"Password": "Passw0rd4U",
"RoleId": "Administrator",
"PasswordChangeRequired": true,
"SNMP": {
"AuthenticationProtocol": "HMAC_SHA96",
"EncryptionKey": "snmpPassw0rd",
"EncryptionProtocol": "CFB128_AES128"
}
}
The following example JSON response is returned:
{
"SNMP": {
"AuthenticationProtocol": "HMAC_SHA96",
"EncryptionKey": null,
"EncryptionKeySet": true,
"EncryptionProtocol": "CFB128_AES128"
},
"@odata.id": "/redfish/v1/AccountService/Accounts/4",
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
},
"AccountTypes": [
"Redfish"
],
"Password": null,
"PasswordChangeRequired": true,
"Description": "This resource is used to represent an account for the manager for a Redfish implementation.",
"Name": "User4",
"UserName": "TempUser",
"PasswordExpiration": "2021-03-22T03:40:13Z",
"Oem": {
"Lenovo": {
"@odata.type": "#LenovoManagerAccount.v1_0_0.LenovoManagerAccount",
"SSHPublicKey": [
"",
"",
"",
""
]
}
},
"RoleId": "Administrator",
"Enabled": true,
"@odata.type": "#ManagerAccount.v1_6_0.ManagerAccount",
"@odata.etag": "\"5e434a32aa61272b802\"",
"Locked": false,
"Id": "4"
}