PATCH – Update userid/password/role/ PasswordChangeRequired
Use the PATCH method to update properties in Account resource for Redfish service.
Request URL
PATCH https://<BMC_IPADDR>/redfish/v1/AccountService/Accounts/{1...12}
Request body
Properties to be updated are shown as bellow, all of these properties can be changed individually.
Field | Type | Description | |
---|---|---|---|
UserName | String | The user name for this account. | |
Password | String | The password of the account. Display null on a PATCH response. | |
RoleId | String | The ID of the Role resource that configured for this account | |
Enabled | Boolean | Enable this account or not. | |
PasswordChangeRequired | Boolean | Set it to true if the password for this account must be changed before further access is allowed. Note This setting is not available in Intel Purley-based systems. | |
SNMP | Object | Expand | |
AuthenticationProtocol | String | Authentication conforms to the authentication protocol. | |
EncryptionKey | String | The secret authentication key for SNMPv3. | |
EncryptionProtocol | String | Encryption conforms to the encryption protocol. |
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": "USERID",
"RoleId": "Administrator",
"PasswordChangeRequired": false
}
The following example JSON response is returned:
{
"AccountTypes": [
"Redfish"
],
"@odata.type": "#ManagerAccount.v1_4_0.ManagerAccount",
"@odata.id": "/redfish/v1/AccountService/Accounts/1",
"Password": null,
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
},
"Name": "User1",
"Enabled": true,
"Id": "1",
"Oem": {
"Lenovo": {
"SSHPublicKey": [
"",
"",
"",
""
],
"SNMPv3Settings": {
"AccessType": "Get",
"PrivacyProtocolPassword": null,
"Destination": "",
"AuthenticationProtocol": "None",
"PrivacyProtocol": "None"
},
"@odata.type": "#LenovoManagerAccount.v1_0_0.LenovoManagerAccount"
}
},
"RoleId": "Administrator",
"UserName": "USERID",
"PasswordChangeRequired": false,
"@odata.etag": "\"fab97f1216ebd001a50b81fb6d23270b\"",
"Locked": false,
"Description": "This resource is used to represent an account for the manager for a Redfish implementation."
}
Give documentation feedback