POST – Create an account
Create an account resource for Redfish service by HTTP POST method.
Request URL
POST https://<BMC_IPADDR>/redfish/v1/AccountService/Accounts
Request body
Field | Type | Description | |
---|---|---|---|
UserName | String | The new account name. | |
Password | String | The new account password. | |
RoleId | String | Role ID for new account. | |
AccountTypes | Array | The various manager services that the new account is allowed to access. | |
AccountTypes[N] | String | “Redfish”, “SNMP”, “ManagerConsole”, “IPMI”, “WebUI” Note If the account has IPMI access right, the password should be set to equal to or less than 20 characters. If the account has SNMP access right, the EncryptionKey should be set to equal to or less than 32 characters. In addition, if EncryptionProtocol is not “none”, AuthenticationProtocol should not be “none” either. | |
Enabled | Boolean | Indicates if this account is enabled. | |
SNMP | Object | Expanded. Note This setting is not available when AccountTypes does not contain “SNMP”. | |
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 |
400 | CreateFailedMissingReqProperties PropertyValueTypeError PropertyValueFormatError ResourceChangeRequried NotRecommandedOperation ForbiddenOperation ResourceAlreadyExists PropertyMissing PasswordChangeRequired |