ManagerAccount
更新时间: 2026/06/26
在Gitcode上查看源码

ResourceDefinition

uris

  • /redfish/v1/AccountService/Accounts/{account_id}

properties

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-指定用户资源模型的OData描述信息
@odata.idstringtrue-指定用户资源节点的访问路径
@odata.typestringtrue-指定用户资源类型
Idstringtrue-指定用户资源的ID
Namestringtrue-指定用户资源的名称
Passwordstringfalse-该属性与PATCH或POST一起使用以写入该帐户的密码,该属性在GET上为空
说明:已屏蔽该属性值频繁变化导致的事件上报
UserNamestringfalse-账户用户名
RoleIdstringfalseAdministrator,Operator,Commonuser,Noaccess,CustomRole1~CustomRole16帐户配置的角色资源的ID
ReauthKeystringtrue-二次认证密码,该属性即为用户密码
Lockedbooleanfalsetrue,false此属性表示帐户服务已被自动锁定,因为超出了锁定阈值,当设置为true时,该帐户被锁定。用户管理员可以将该属性写入false以手动解锁,或者一旦锁定持续时间过去,帐户服务就会解锁
Enabledbooleanfalsetrue,false用户管理员使用该属性来禁用具有删除用户信息的帐户,当设置为true时,用户可以登录,当设置为false时,该帐户被管理禁用,用户无法登录
HostBootstrapAccountbooleantrue-指示此帐户是否为主机接口的引导程序帐户
Oem.Publicobjectfalse-自定义属性
AccountInsecurePromptEnabledbooleanfalsetrue,false账户不安全提示使能
FirstLoginPolicystringfalseForcePasswordReset,PromptPasswordReset账户为初始状态时,首次登陆该账户时的密码修改策略
说明:BMC300 5.01.00.01及以上版本支持
IssueBystringtrue-颁发者
IssueTostringtrue-使用者
ValidFromstringtrue-证书有效起始日期
ValidTostringtrue-证书有效截止日期
SerialNumberstringtrue-序列号
RootCertUploadedStatestringtrue-根证书状态
FingerPrintstringtrue-客户端证书指纹
RevokedStatebooleantruetrue,false客户端证书吊销状态:
● true:已吊销
● false:未吊销
RevokedDatestringtrue-吊销日期
SSHPublicKeyHashstringtrue-SSH公钥的哈希值
LoginInterfacearrayfalseWeb,SNMP,IPMI,SSH,SFTP,Local,Redfish登录接口
SnmpV3AuthProtocolstringfalseMD5,SHA,SHA1,SHA256,SHA384,SHA512SnmpV3鉴权算法
说明:GA140C机型不支持
SnmpV3PrivProtocolstringfalseDES,AES,AES256SnmpV3加密算法
说明:GA140C机型不支持
SnmpV3PrivPasswdstringfalse-Snmp加密密码,固定返回null
说明:GA140C机型不支持
SNMPEncryptPwdInitbooleantrue-SNMP加密密码是否初始化,其中true为未初始化,false为已经初始化
说明:GA140C机型不支持
Deleteablebooleantrue-用户是否可删除
LoginRulearrayfalse-本地用户关联的登录规则
PasswordValidityDaysnumbertrue-密码有效期,永不过期时显示为null
LoginAuditobjecttrue-登录审计信息,记录当前用户的上次登录情况
说明:BMC300 5.10.0.1及以上版本支持
LastLoginTimestringtrue-上次登录时间,无信息则显示为空字符串
LastLoginIpstringtrue-上次登录ip,无信息则显示为空字符串
LastLoginInterfacestringtrue-上次登录方式,无信息则显示为空字符串
Actionsobjecttrue-
Linksobjecttrue-用户资源相关链接信息

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

使用指南

使用实例

请求样例:

http
GET https://device_ip/redfish/v1/AccountService/Accounts/2

请求头:


X-Auth-Token: 123456789***********************
Content-Type: application/json

请求消息体:无

响应样例:

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

请求消息体:

json
{
  "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"中的一个或者多个,分别表示用户可支持登录的接口,若为空则都不支持
SnmpV3AuthProtocolV3鉴权算法● MD5
● SHA
● SHA1(已废弃,不建议使用,等价于SHA)
● SHA256
● SHA384
● SHA512
说明:GA140C机型不支持
SnmpV3PrivProtocolV3加密算法● 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秒之后才能生效。

使用实例

请求样例:

http
PATCH https://device_ip/redfish/v1/AccountService/Accounts/2

请求头:


X-Auth-Token: 123456789***********************
Content-Type: application/json
If-Match: W/"3d607e36"

请求消息体:

json
&#123;
  "UserName": "newtest",
  "Password": "pswexp",
  "RoleId": "Operator"
&#125;

响应样例:

json
{
  "@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": &#123;
        "LastLoginTime": "2023-07-28T04:46:34+08:00",
        "LastLoginIp": "192.168.1.1",
        "LastLoginInterface": ""
      &#125;,
      "Actions": {
        "#Account.ImportMutualAuthClientCert": &#123;
          "target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportMutualAuthClientCert",
          "@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/ImportMutualAuthClientCertActionInfo"
        &#125;,
        "#Account.DeleteMutualAuthClientCert": &#123;
          "target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteMutualAuthClientCert",
          "@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/DeleteMutualAuthClientCertActionInfo"
        &#125;,
        "#Account.ImportSSHPublicKey": &#123;
          "target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportSSHPublicKey",
          "@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/ImportSSHPublicKeyActionInfo"
        &#125;,
        "#Account.DeleteSSHPublicKey": &#123;
          "target": "/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteSSHPublicKey",
          "@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/2/DeleteSSHPublicKeyActionInfo"
        &#125;
      }
    }
  },
  "Links": {
    "Role": &#123;
      "@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
    &#125;
  }
}

响应码: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创建会话时获得

使用指南

使用实例

请求样例:

http
DELETE https://device_ip/redfish/v1/AccountService/Accounts/9

请求头:


X-Auth-Token: 123456789***********************

请求消息体:无

响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      &#123;
        "@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."
      &#125;
    ]
  }
}

响应码:200

输出说明

参见 DELETE 通用输出说明

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

请求消息体:

json
&#123;
  "Type": type_value,
  "Content": content_value
&#125;

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
account_id用户的ID2~17
type_value双因素证书导入的方法● URI
● Text
content_value双因素证书导入的路径导入格式:
1、文本形式导入:填写双因素客户端的内容
2、本地导入:"/tmp/目录/文件名"
远程导入:"文件传输协议://用户名:密码@ip地址/目录/文件名"(文件传输协议包括五种:sftp、https、nfs、cifs、scp)

使用指南

BMC300 5.3.0.1及以上版本支持。 双因素客户端证书的内容或者证书路径需要预先存放在Content属性中,否则返回400。

使用实例

请求样例(文本形式):

http
POST https://device_ip/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportMutualAuthClientCert

请求头:


X-Auth-Token: 123456789***********************
Content-Type: application/json

请求消息体(文本形式):

json
&#123;
  "Type": "text",
  "Content": ""
&#125;

文本形式/本地文件形式的响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      &#123;
        "@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"
      &#125;
    ]
  }
}

响应码:200

请求消息体(远程文件形式):

json
&#123;
  "Type": "URI",
  "Content": "sftp://username:password@10.10.10.191/usr/server.cer"
&#125;

请求消息体(本地文件形式):

json
&#123;
  "Type": "URI",
  "Content": "/tmp/server.cer"
&#125;

远程文件形式的响应样例:

json
{
  "@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": &#123;
      "TaskPercentage": null
    &#125;
  }
}

响应码:202

本地文件形式的响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      &#123;
        "@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"
      &#125;
    ]
  }
}

响应码: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

请求消息体:

json
&#123;&#125;

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
account_id待修改的用户的ID2~17

使用指南

BMC300 5.3.0.1及以上版本支持。

使用实例

请求样例:

http
POST https://device_ip/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteMutualAuthClientCert

请求头:


X-Auth-Token: 123456789***********************
Content-Type: application/json

请求消息体:

json
&#123;&#125;

响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      &#123;
        "@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"
      &#125;
    ]
  }
}

响应码: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

请求消息体:

json
&#123;
  "Type": type_value,
  "Content": content_value
&#125;

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
account_id用户的ID2~17
type_valueSSH公钥导入的方法● URI
● text
content_valueSSH公钥导入的路径导入格式:
1、文本形式导入:填写SSH公钥的内容
2、本地导入:"/tmp/目录/文件名"
远程导入:"文件传输协议://用户名:密码@ip地址/目录/文件名"(文件传输协议包括五种:sftp、https、nfs、cifs、scp)
仅支持".pub"格式文件。

使用指南

SSH公钥的内容或者公钥路径需要预先存放在Content属性中,否则返回400。

使用实例

请求样例(文本形式):

http
POST https://device_ip/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.ImportSSHPublicKey

请求头:


X-Auth-Token: 123456789***********************
Content-Type: application/json

请求消息体(文本形式):

json
&#123;
  "Type": "text",
  "Content": ""
&#125;

文本形式/本地文件形式的响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      &#123;
        "@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"
      &#125;
    ]
  }
}

响应码:200

请求消息体(远程文件形式):

json
&#123;
  "Type": "URI",
  "Content": "sftp://username:password@10.10.10.191/usr/key.pub"
&#125;

请求消息体(本地文件形式):

json
&#123;
  "Type": "URI",
  "Content": "/tmp/key.pub"
&#125;

远程文件形式的响应样例:

json
{
  "@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": &#123;
      "TaskPercentage": null
    &#125;
  }
}

响应码:202

本地文件形式的响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      &#123;
        "@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"
      &#125;
    ]
  }
}

响应码: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

请求消息体:

json
&#123;&#125;

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
account_id待修改的用户的ID2~17

使用指南

使用实例

请求样例:

http
POST https://device_ip/redfish/v1/AccountService/Accounts/2/Oem/Public/Actions/Account.DeleteSSHPublicKey

请求头:


X-Auth-Token: 123456789***********************
Content-Type: application/json

请求消息体:

json
&#123;&#125;

响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      &#123;
        "@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"
      &#125;
    ]
  }
}

响应码: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***********************

请求消息体:

json
&#123;
  "NewPassword": new_password,
  "SessionAccountPassword": session_account_password
&#125;

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
member_id指定用户的ID可通过用户集合资源获得
new_password待设置的新密码必需参数,最大长度512
session_account_password当前会话对应用户的密码必需参数,最大长度512

使用指南

使用实例

请求样例:

http
POST https://device_ip/redfish/v1/AccountService/Accounts/member_id/Actions/ManagerAccount.ChangePassword

请求头:


X-Auth-Token: 123456789***********************

请求消息体:

json
&#123;
  "NewPassword": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "SessionAccountPassword": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
&#125;

响应样例:

json
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      &#123;
        "@odata.type": "#Message.v1_0_0.Message",
        "MessageId": "Base.1.0.ChangePasswordSuccess",
        "RelatedProperties": [
          "#/ManagerAccount.ChangePassword"
        ],
        "Message": "Password change successfully",
        "MessageArgs": [],
        "Severity": "OK",
        "Resolution": "None"
      &#125;
    ]
  }
}

响应码:200