ResourceDefinition
uris
/redfish/v1/AccountService/Accounts/{account_id}
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | 指定用户资源模型的OData描述信息 |
| @odata.id | string | true | - | 指定用户资源节点的访问路径 |
| @odata.type | string | true | - | 指定用户资源类型 |
| Id | string | true | - | 指定用户资源的ID |
| Name | string | true | - | 指定用户资源的名称 |
| Password | string | false | - | 该属性与PATCH或POST一起使用以写入该帐户的密码,该属性在GET上为空 说明:已屏蔽该属性值频繁变化导致的事件上报 |
| UserName | string | false | - | 账户用户名 |
| RoleId | string | false | Administrator,Operator,Commonuser,Noaccess,CustomRole1~CustomRole16 | 帐户配置的角色资源的ID |
| ReauthKey | string | true | - | 二次认证密码,该属性即为用户密码 |
| Locked | boolean | false | true,false | 此属性表示帐户服务已被自动锁定,因为超出了锁定阈值,当设置为true时,该帐户被锁定。用户管理员可以将该属性写入false以手动解锁,或者一旦锁定持续时间过去,帐户服务就会解锁 |
| Enabled | boolean | false | true,false | 用户管理员使用该属性来禁用具有删除用户信息的帐户,当设置为true时,用户可以登录,当设置为false时,该帐户被管理禁用,用户无法登录 |
| HostBootstrapAccount | boolean | true | - | 指示此帐户是否为主机接口的引导程序帐户 |
| Oem.Public | object | false | - | 自定义属性 |
| AccountInsecurePromptEnabled | boolean | false | true,false | 账户不安全提示使能 |
| FirstLoginPolicy | string | false | ForcePasswordReset,PromptPasswordReset | 账户为初始状态时,首次登陆该账户时的密码修改策略 说明:BMC300 5.01.00.01及以上版本支持 |
| IssueBy | string | true | - | 颁发者 |
| IssueTo | string | true | - | 使用者 |
| ValidFrom | string | true | - | 证书有效起始日期 |
| ValidTo | string | true | - | 证书有效截止日期 |
| SerialNumber | string | true | - | 序列号 |
| RootCertUploadedState | string | true | - | 根证书状态 |
| FingerPrint | string | true | - | 客户端证书指纹 |
| RevokedState | boolean | true | true,false | 客户端证书吊销状态: ● true:已吊销 ● false:未吊销 |
| RevokedDate | string | true | - | 吊销日期 |
| SSHPublicKeyHash | string | true | - | SSH公钥的哈希值 |
| LoginInterface | array | false | Web,SNMP,IPMI,SSH,SFTP,Local,Redfish | 登录接口 |
| SnmpV3AuthProtocol | string | false | MD5,SHA,SHA1,SHA256,SHA384,SHA512 | SnmpV3鉴权算法 说明:GA140C机型不支持 |
| SnmpV3PrivProtocol | string | false | DES,AES,AES256 | SnmpV3加密算法 说明:GA140C机型不支持 |
| SnmpV3PrivPasswd | string | false | - | Snmp加密密码,固定返回null 说明:GA140C机型不支持 |
| SNMPEncryptPwdInit | boolean | true | - | SNMP加密密码是否初始化,其中true为未初始化,false为已经初始化 说明:GA140C机型不支持 |
| Deleteable | boolean | true | - | 用户是否可删除 |
| LoginRule | array | false | - | 本地用户关联的登录规则 |
| PasswordValidityDays | number | true | - | 密码有效期,永不过期时显示为null |
| LoginAudit | object | true | - | 登录审计信息,记录当前用户的上次登录情况 说明:BMC300 5.10.0.1及以上版本支持 |
| LastLoginTime | string | true | - | 上次登录时间,无信息则显示为空字符串 |
| LastLoginIp | string | true | - | 上次登录ip,无信息则显示为空字符串 |
| LastLoginInterface | string | true | - | 上次登录方式,无信息则显示为空字符串 |
| Actions | object | true | - | |
| Links | object | true | - | 用户资源相关链接信息 |
supported_methods
- GET
- PATCH
- DELETE
- POST
HTTP methods
GET
命令功能
查询指定用户资源信息
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts/member_id
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| member_id | 用户ID | 可通过查询用户列表获得 |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
| header_type | 请求消息的格式 | 支持的消息格式包括: ● application/json ● application/json;charset=utf-8 |
使用指南
无
使用实例
请求样例:
GET https://device_ip/redfish/v1/AccountService/Accounts/2请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体:无
响应样例:
{
"@odata.context": "/redfish/v1/$metadata#ManagerAccountService.ManagerAccountService",
"@odata.id": "/redfish/v1/AccountService/Accounts/2",
"@odata.type": "#ManagerAccount.v1_8_0.ManagerAccount",
"Id": "2",
"Name": "User Account",
"Password": null,
"UserName": "root",
"RoleId": "Administrator",
"ReauthKey": "null",
"Locked": false,
"Enabled": true,
"HostBootstrapAccount": false,
"Oem": {
"Public": {
"AccountInsecurePromptEnabled": false,
"FirstLoginPolicy": "ForcePasswordReset",
"SSHPublicKeyHash": null,
"LoginInterface": [
"Web",
"SNMP",
"IPMI",
"SSH",
"SFTP",
"Local",
"Redfish"
],
"SnmpV3AuthProtocol": "MD5",
"SnmpV3PrivProtocol": "AES",
"SnmpV3PrivPasswd": null,
"SNMPEncryptPwdInit": false,
"Deleteable": false,
"LoginRule": [
{
"@odata.id": "/redfish/v1/Managers/1#/Oem/Public/LoginRule/1"
}
],
"PasswordValidityDays": 1,
"LoginAudit": {
"LastLoginTime": "2023-07-28T04:46:34+08:00",
"LastLoginIp": "192.168.1.1",
"LastLoginInterface": ""
},
"Actions": {
"#Account.ImportMutualAuthClientCert": {
"target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportMutualAuthClientCert",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/ImportMutualAuthClientCertActionInfo"
},
"#Account.DeleteMutualAuthClientCert": {
"target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteMutualAuthClientCert",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/DeleteMutualAuthClientCertActionInfo"
},
"#Account.ImportSSHPublicKey": {
"target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportSSHPublicKey",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/ImportSSHPublicKeyActionInfo"
},
"#Account.DeleteSSHPublicKey": {
"target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteSSHPublicKey",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/DeleteSSHPublicKeyActionInfo"
}
}
}
},
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
}
}响应码:200
PATCH
命令功能
修改指定用户信息
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts/account_id
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type
If-Match: ifmatch_value请求消息体:
{
"UserName": username,
"Password": password,
"RoleId": role,
"Locked": state1,
"Enabled": state2,
"Oem": {
"Public": {
"AccountInsecurePromptEnabled": AccountInsecurePromptEnabled_value,
"FirstLoginPolicy": FirstLoginPolicy_value,
"LoginInterface": [
LoginInterface_value
],
"SnmpV3AuthProtocol": SnmpV3AuthProtocol,
"SnmpV3PrivProtocol": SnmpV3PrivProtocol,
"SnmpV3PrivPasswd": password_value,
"LoginRule": [
LoginRule_value
]
}
}
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| account_id | 待修改的用户的Id | 用户Id |
| ifmatch_value | 请求消息的匹配参数 | 可通过对指定用户资源发起GET操作,从响应头中获取(对应于"ETag"参数) |
| username | 修改后的用户名 | 取值范围:1~16位的字符串 取值原则: ● 由特殊符号、英文字母和数字组成,不能包含空格且首字符不能是"#","+","-" ● 特殊字符不包括:" :<>&,'"/% ● 用户名不能为"."或".." |
| password | 修改后的用户密码 | 最大长度20的字符串。 ● 如果其他接口启用了密码复杂度检查功能,则设置和修改的密码必须遵循密码复杂度的规则 ● 如果其他接口未启用密码复杂度检查功能,则设置和修改的密码可以为任意字符 |
| role | 修改后的用户角色 | 可设置的角色类型包括: ● Administrator ● Operator ● Commonuser ● Noaccess ● CustomRole1~CustomRole16 说明: ● BMC300 5.01.00.01及以上版本支持 ● 当BMC中存在多个启用的管理员时,可以修改默认用户的角色。 ● 当仅有一个启用的管理员用户时,该管理员用户不能被修改角色、禁用或删除 |
| state1 | 修改后的用户锁定状态 | 修改时只能设置为false |
| state2 | 修改后的用户使能状态 | ● true ● false |
| AccountInsecurePromptEnabled_value | 修改后的用户不安全提示状态 | ● true ● false |
| FirstLoginPolicy_value | 账户密码被修改后,首次登陆时的密码修改策略 | 字符串,取值为: ● ForcePasswordReset ● PromptPasswordReset 说明:BMC300 5.01.00.01及以上版本支持 |
| LoginInterface_value | 用户登录接口 | 数组类型,取值为"Web"、"Snmp"、"IPMI"、"SSH"、"SFTP"、"Local"、"Redfish"中的一个或者多个,分别表示用户可支持登录的接口,若为空则都不支持 |
| SnmpV3AuthProtocol | V3鉴权算法 | ● MD5 ● SHA ● SHA1(已废弃,不建议使用,等价于SHA) ● SHA256 ● SHA384 ● SHA512 说明:GA140C机型不支持 |
| SnmpV3PrivProtocol | V3加密算法 | ● DES ● AES ● AES256 加密算法AES256只能与鉴权算法SHA256、SHA384或SHA512搭配使用 说明:GA140C机型不支持 |
| password_value | 被用于SNMPv3鉴权的用户的加密密码 | 字符串,取值原则: 关闭密码检查功能后,密码不能为空,可以是任意字符组成的长度不大于20的字符串。 启用密码检查功能后,密码复杂度要求: 长度为8~20个字符。 至少包含一个空格或者以下特殊字符:"`~!@#$%^&*()-_=+|[{}];:'",<.>/? 至少包含以下字符中的两种: 小写字母:a~z 大写字母:A~Z 数字:0~9 密码不能是用户名或用户名的倒序。 新旧口令至少在2个字符位上不同。 ● 弱口令字典认证功能使能的情况下,密码不能在弱口令字典中。 |
| LoginRule_value | 用户登录规则 | 类型为数组,取值为"Rule1"、"Rule2"、"Rule3"中的一个或者多个,分别表示规则一,规则二和规则三 |
使用指南
针对指定用户,可同时修改请求消息体中的1个或多个属性,修改用户密码成功之后,需等待约5秒之后才能生效。
使用实例
请求样例:
PATCH https://device_ip/redfish/v1/AccountService/Accounts/2请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json
If-Match: W/"3d607e36"请求消息体:
{
"UserName": "newtest",
"Password": "pswexp",
"RoleId": "Operator"
}响应样例:
{
"@odata.context": "/redfish/v1/$metadata#ManagerAccount.ManagerAccount",
"@odata.id": "/redfish/v1/AccountService/Accounts/2",
"@odata.type": "#ManagerAccount.v1_0_2.ManagerAccount",
"Id": "2",
"Name": "User Account",
"Password": null,
"UserName": "newtest",
"RoleId": "Operator",
"ReauthKey": "null",
"Locked": false,
"Enabled": true,
"Oem": {
"Public": {
"AccountInsecurePromptEnabled": false,
"FirstLoginPolicy": "ForcePasswordReset",
"SSHPublicKeyHash": null,
"LoginInterface": [
"Web",
"SNMP",
"IPMI",
"SSH",
"SFTP",
"Local",
"Redfish"
],
"SnmpV3AuthProtocol": "MD5",
"SnmpV3PrivProtocol": "AES",
"SnmpV3PrivPasswd": "Admin@9000",
"SNMPEncryptPwdInit": false,
"Deleteable": false,
"LoginRule": [],
"PasswordValidityDays": 1,
"LoginAudit": {
"LastLoginTime": "2023-07-28T04:46:34+08:00",
"LastLoginIp": "192.168.1.1",
"LastLoginInterface": ""
},
"Actions": {
"#Account.ImportMutualAuthClientCert": {
"target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportMutualAuthClientCert",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/ImportMutualAuthClientCertActionInfo"
},
"#Account.DeleteMutualAuthClientCert": {
"target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteMutualAuthClientCert",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/DeleteMutualAuthClientCertActionInfo"
},
"#Account.ImportSSHPublicKey": {
"target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportSSHPublicKey",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/ImportSSHPublicKeyActionInfo"
},
"#Account.DeleteSSHPublicKey": {
"target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteSSHPublicKey",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/DeleteSSHPublicKeyActionInfo"
}
}
}
},
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
}
}响应码:200
DELETE
命令功能
删除用户
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts/account_id
请求头:
X-Auth-Token: 123456789***********************请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| account_id | 用户ID | 可通过查询用户列表获得 |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
使用指南
无
使用实例
请求样例:
DELETE https://device_ip/redfish/v1/AccountService/Accounts/9请求头:
X-Auth-Token: 123456789***********************请求消息体:无
响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "Base.1.0.AccountRemoved",
"RelatedProperties": [],
"Message": "The account was successfully removed.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "No resolution is required."
}
]
}
}响应码:200
输出说明
POST (ACTION)
ImportMutualAuthClientCert
命令功能
双因素认证的用户的客户端证书导入
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts/account_id/Oem/Public/Actions/Account.ImportMutualAuthClientCert
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"Type": type_value,
"Content": content_value
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| account_id | 用户的ID | 2~17 |
| type_value | 双因素证书导入的方法 | ● URI ● Text |
| content_value | 双因素证书导入的路径 | 导入格式: 1、文本形式导入:填写双因素客户端的内容 2、本地导入:"/tmp/目录/文件名" 远程导入:"文件传输协议://用户名:密码@ip地址/目录/文件名"(文件传输协议包括五种:sftp、https、nfs、cifs、scp) |
使用指南
BMC300 5.3.0.1及以上版本支持。 双因素客户端证书的内容或者证书路径需要预先存放在Content属性中,否则返回400。
使用实例
请求样例(文本形式):
POST https://device_ip/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportMutualAuthClientCert请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体(文本形式):
{
"Type": "text",
"Content": ""
}文本形式/本地文件形式的响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "iBMC.1.0.ClientCertificateImportSuccess",
"RelatedProperties": [
"#/Account.ImportMutualAuthClientCert"
],
"Message": "Two-factor client certificate imported successfully.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "None"
}
]
}
}响应码:200
请求消息体(远程文件形式):
{
"Type": "URI",
"Content": "sftp://username:password@10.10.10.191/usr/server.cer"
}请求消息体(本地文件形式):
{
"Type": "URI",
"Content": "/tmp/server.cer"
}远程文件形式的响应样例:
{
"@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_2.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"Id": "1",
"Name": "ImportAccountCertificate",
"Description": "",
"TaskState": "Running",
"TaskStatus": "OK",
"StartTime": "2017-05-17T18:32:32+00:00",
"Messages": [],
"PercentComplete": null,
"Oem": {
"Public": {
"TaskPercentage": null
}
}
}响应码:202
本地文件形式的响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "iBMC.1.0.ClientCertificateImportSuccess",
"RelatedProperties": [
"#/Account.ImportMutualAuthClientCert"
],
"Message": "Two-factor client certificate imported successfully.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "None"
}
]
}
}响应码:200
POST (ACTION)
DeleteMutualAuthClientCert
命令功能
双因素认证的用户的客户端证书删除
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts/account_id/Oem/Public/Actions/Account.DeleteMutualAuthClientCert
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| account_id | 待修改的用户的ID | 2~17 |
使用指南
BMC300 5.3.0.1及以上版本支持。
使用实例
请求样例:
POST https://device_ip/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteMutualAuthClientCert请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体:
{}响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "iBMC.1.0.ClientCertificateDeleteSuccess",
"RelatedProperties": [
"#/Account.DeleteMutualAuthClientCert"
],
"Message": "Successfully deleted the two-factor client certificate, (UserName: root).",
"MessageArgs": [
"root"
],
"Severity": "OK",
"Resolution": "None"
}
]
}
}响应码:200
ImportSSHPublicKey
命令功能
SSH公钥导入
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts/account_id/Oem/Public/Actions/Account.ImportSSHPublicKey
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"Type": type_value,
"Content": content_value
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| account_id | 用户的ID | 2~17 |
| type_value | SSH公钥导入的方法 | ● URI ● text |
| content_value | SSH公钥导入的路径 | 导入格式: 1、文本形式导入:填写SSH公钥的内容 2、本地导入:"/tmp/目录/文件名" 远程导入:"文件传输协议://用户名:密码@ip地址/目录/文件名"(文件传输协议包括五种:sftp、https、nfs、cifs、scp) 仅支持".pub"格式文件。 |
使用指南
SSH公钥的内容或者公钥路径需要预先存放在Content属性中,否则返回400。
使用实例
请求样例(文本形式):
POST https://device_ip/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportSSHPublicKey请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体(文本形式):
{
"Type": "text",
"Content": ""
}文本形式/本地文件形式的响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "iBMC.1.0.ImportPublickeyOK",
"RelatedProperties": [
"#/Account.ImportSSHPublicKey"
],
"Message": "Successfully imported the SSH public key.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "None"
}
]
}
}响应码:200
请求消息体(远程文件形式):
{
"Type": "URI",
"Content": "sftp://username:password@10.10.10.191/usr/key.pub"
}请求消息体(本地文件形式):
{
"Type": "URI",
"Content": "/tmp/key.pub"
}远程文件形式的响应样例:
{
"@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_2.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/2",
"Id": "2",
"Name": "Import File Task",
"Description": "",
"TaskState": "Running",
"TaskStatus": "OK",
"StartTime": "2017-05-17T18:35:01+00:00",
"Messages": [],
"PercentComplete": null,
"Oem": {
"Public": {
"TaskPercentage": null
}
}
}响应码:202
本地文件形式的响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "iBMC.1.0.ImportPublickeyOK",
"RelatedProperties": [
"#/Account.ImportSSHPublicKey"
],
"Message": "Successfully imported the SSH public key.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "None"
}
]
}
}响应码:200
DeleteSSHPublicKey
命令功能
SSH公钥删除
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts/account_id/Oem/Public/Actions/Account.DeleteSSHPublicKey
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| account_id | 待修改的用户的ID | 2~17 |
使用指南
无
使用实例
请求样例:
POST https://device_ip/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteSSHPublicKey请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体:
{}响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "iBMC.1.0.DeletePublicKeyOK",
"RelatedProperties": [
"#/Account.DeleteSSHPublicKey"
],
"Message": "Successfully deleted the SSH public key.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "None"
}
]
}
}响应码:200
POST (ACTION)
ChangePassword
命令功能
修改指定用户的密码
说明
BMC300 5.12.0.1及以上版本支持
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts/member_id/Actions/ManagerAccount.ChangePassword
请求头:
X-Auth-Token: 123456789***********************请求消息体:
{
"NewPassword": new_password,
"SessionAccountPassword": session_account_password
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| member_id | 指定用户的ID | 可通过用户集合资源获得 |
| new_password | 待设置的新密码 | 必需参数,最大长度512 |
| session_account_password | 当前会话对应用户的密码 | 必需参数,最大长度512 |
使用指南
无
使用实例
请求样例:
POST https://device_ip/redfish/v1/AccountService/Accounts/member_id/Actions/ManagerAccount.ChangePassword请求头:
X-Auth-Token: 123456789***********************请求消息体:
{
"NewPassword": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"SessionAccountPassword": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}响应样例:
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "Base.1.0.ChangePasswordSuccess",
"RelatedProperties": [
"#/ManagerAccount.ChangePassword"
],
"Message": "Password change successfully",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "None"
}
]
}
}响应码:200