ManagerAccountCollection
更新时间: 2026/06/26
在AtomGit上查看源码ResourceDefinition
uris
/redfish/v1/AccountService/Accounts
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | Accounts资源模型的OData描述信息 |
| @odata.id | string | true | - | Accounts资源节点的访问路径 |
| @odata.type | string | true | - | Accounts资源类型 |
| Name | string | true | - | Accounts资源的名称 |
| Members [ { | array | true | - | 用户列表,提供所有用户URL的引用 |
| Members[].@odata.context | string | true | - | 指定用户资源模型的OData描述信息 |
| Members[].@odata.id | string | true | - | 指定用户资源节点的访问路径 |
| Members[].@odata.type | string | true | - | 指定用户资源类型 |
| Members[].Enabled | boolean | false | true,false | 用户管理员使用该属性来禁用具有删除用户信息的帐户,当设置为true时,用户可以登录,当设置为false时,该帐户被管理禁用,用户无法登录 |
| Members[].Id | string | true | - | 指定用户资源的ID |
| Members[].Links { | object | true | - | 用户资源相关链接信息 |
| Members[].Links.Role { | object | true | - | 用户资源相关链接信息 |
| Members[].Links.Role.@odata.id | string | true | - | 指定用户资源节点的访问路径 |
| } | ||||
| } | ||||
| Members[].Locked | boolean | false | true,false | 此属性表示帐户服务已被自动锁定,因为超出了锁定阈值,当设置为true时,该帐户被锁定。用户管理员可以将该属性写入false以手动解锁,或者一旦锁定持续时间过去,帐户服务就会解锁 |
| Members[].Name | string | true | - | 指定用户资源的名称 |
| Members[].Oem { | object | true | - | 成员的自定义属性 |
| Members[].Oem.Public { | object | false | - | 自定义属性 |
| Members[].Oem.Public.AccountInsecurePromptEnabled | boolean | false | true,false | 账户不安全提示使能 |
| Members[].Oem.Public.Actions { | object | false | - | 自定义属性 |
| Members[].Oem.Public.Actions.#Account.DeleteMutualAuthClientCert { | object | false | - | 自定义属性 |
| Members[].Oem.Public.Actions.#Account.DeleteMutualAuthClientCert.@Redfish.ActionInfo | string | true | - | 操作信息查询路径 |
| Members[].Oem.Public.Actions.#Account.DeleteMutualAuthClientCert.target | string | true | - | 操作路径 |
| } | ||||
| Members[].Oem.Public.Actions.#Account.DeleteSSHPublicKey { | object | false | - | 自定义属性 |
| Members[].Oem.Public.Actions.#Account.DeleteSSHPublicKey.@Redfish.ActionInfo | string | true | - | 操作信息查询路径 |
| Members[].Oem.Public.Actions.#Account.DeleteSSHPublicKey.target | string | true | - | 操作路径 |
| } | ||||
| Members[].Oem.Public.Actions.#Account.ImportMutualAuthClientCert { | object | false | - | 自定义属性 |
| Members[].Oem.Public.Actions.#Account.ImportMutualAuthClientCert.@Redfish.ActionInfo | string | true | - | 操作信息查询路径 |
| Members[].Oem.Public.Actions.#Account.ImportMutualAuthClientCert.target | string | true | - | 操作路径 |
| } | ||||
| Members[].Oem.Public.Actions.#Account.ImportSSHPublicKey { | object | false | - | 自定义属性 |
| Members[].Oem.Public.Actions.#Account.ImportSSHPublicKey.@Redfish.ActionInfo | string | true | - | 操作信息查询路径 |
| Members[].Oem.Public.Actions.#Account.ImportSSHPublicKey.target | string | true | - | 操作路径 |
| } | ||||
| } | ||||
| Members[].Oem.Public.Deleteable | boolean | true | - | 用户是否可删除 |
| Members[].Oem.Public.FirstLoginPolicy | string | false | ForcePasswordReset,PromptPasswordReset | 账户为初始状态时,首次登陆该账户时的密码修改策略,包括: ● ForcePasswordReset:账户为初始状态时首次登录的密码修改策略 ● PromptPasswordReset:账户为初始状态时首次登录的密码修改策略 说明:BMC300 5.01.00.01及以上版本支持 |
| Members[].Oem.Public.LoginAudit { | object | false | - | 自定义属性 |
| Members[].Oem.Public.LoginAudit.LastLoginInterface | string | true | - | 上次登录方式,无信息则显示为空字符串 |
| Members[].Oem.Public.LoginAudit.LastLoginIp | string | true | - | 上次登录ip,无信息则显示为空字符串 |
| Members[].Oem.Public.LoginAudit.LastLoginTime | string | true | - | 上次登录时间,无信息则显示为空字符串 |
| } | ||||
| Members[].Oem.Public.LoginInterface[ ] | array | false | - | 自定义属性 |
| Members[].Oem.Public.LoginRule[ ] | array | false | - | 自定义属性 |
| Members[].Oem.Public.PasswordValidityDays | null | true | - | 密码有效期,永不过期时显示为null |
| Members[].Oem.Public.SNMPEncryptPwdInit | boolean | true | - | SNMP加密密码是否初始化,其中true为未初始化,false为已经初始化 说明:GA140C机型不支持 |
| Members[].Oem.Public.SSHPublicKeyHash | null | true | - | SSH公钥的哈希值 |
| Members[].Oem.Public.SnmpV3AuthProtocol | string | false | MD5,SHA,SHA1,SHA256,SHA384,SHA512 | SnmpV3鉴权算法,包括: ● MD5:MD5 ● SHA:SHA ● SHA1:SHA1 ● SHA256:SHA256 ● SHA384:SHA384 ● SHA512:SHA512 说明:GA140C机型不支持 |
| Members[].Oem.Public.SnmpV3PrivPasswd | null | false | - | Snmp加密密码,固定返回null 说明:GA140C机型不支持 |
| Members[].Oem.Public.SnmpV3PrivProtocol | string | false | DES,AES,AES256 | SnmpV3加密算法,包括: ● AES:AES ● AES256:AES256 ● DES:DES 说明:GA140C机型不支持 |
| } | ||||
| } | ||||
| Members[].Password | null | false | - | 该属性与PATCH或POST一起使用以写入该帐户的密码,该属性在GET上为空 说明:已屏蔽该属性值频繁变化导致的事件上报 |
| Members[].ReauthKey | string | true | - | 二次认证密码,该属性即为用户密码 |
| Members[].RoleId | string | false | Administrator,Operator,Commonuser,Noaccess,CustomRole1~CustomRole16 | 帐户配置的角色资源的ID,包括: ● Administrator:管理员 ● Commonuser:普通用户 ● CustomRole1~CustomRole16:自定义用户1~自定义用户16 ● Noaccess:无权限用户 ● Operator:操作员 |
| Members[].UserName | string | false | - | 账户用户名 |
| } ] | ||||
| Members@odata.count | number | true | - | 当前用户数量 |
supported_methods
- GET
- POST
HTTP methods
GET
命令功能
查询用户集合资源信息
命令格式
URL: https://device_ip/redfish/v1/AccountService/Accounts
请求头:
X-Auth-Token: 123456789***********************请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| auth_value | 执行该GET请求时,必须在"Headers"中携带"X-Auth-Token"值用于鉴权 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
使用指南
无
使用实例
请求样例:
http
GET https://device_ip/redfish/v1/AccountService/Accounts请求头:
X-Auth-Token: 123456789***********************请求消息体:无
响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#ManagerAccountCollection.ManagerAccountCollection",
"@odata.id": "/redfish/v1/AccountService/Accounts",
"@odata.type": "#ManagerAccountCollection.ManagerAccountCollection",
"Name": "Accounts Collection",
"Members@odata.count": 8,
"Members": [
{
"@odata.context": "/redfish/v1/$metadata#AccountService/Accounts/Members/$entity",
"@odata.id": "/redfish/v1/AccountService/Accounts/2",
"@odata.type": "#ManagerAccount.v1_0_2.ManagerAccount",
"Id": "2",
"Name": "User Account",
"Password": null,
"UserName": "Administrator",
"RoleId": "Administrator",
"ReauthKey": "null",
"Locked": false,
"Enabled": true,
"Oem": {
"Public": {
"AccountInsecurePromptEnabled": false,
"FirstLoginPolicy": "ForcePasswordReset",
"SSHPublicKeyHash": null,
"LoginInterface": [
"Web",
"SNMP",
"IPMI",
"SSH",
"SFTP",
"Local",
"Redfish"
],
"SnmpV3AuthProtocol": "SHA256",
"SnmpV3PrivProtocol": "AES",
"SnmpV3PrivPasswd": null,
"SNMPEncryptPwdInit": true,
"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"
}
}
},
{
"@odata.context": "/redfish/v1/$metadata#AccountService/Accounts/Members/$entity",
"@odata.id": "/redfish/v1/AccountService/Accounts/3",
"@odata.type": "#ManagerAccount.v1_0_2.ManagerAccount",
"Id": "3",
"Name": "User Account",
"Password": null,
"UserName": "operator",
"RoleId": "Operator",
"Locked": false,
"Enabled": true,
"Oem": {
"Public": {
"AccountInsecurePromptEnabled": true,
"FirstLoginPolicy": "ForcePasswordReset",
"SSHPublicKeyHash": null,
"LoginInterface": [
"Web",
"SNMP",
"IPMI",
"SSH",
"SFTP",
"Local",
"Redfish"
],
"SnmpV3AuthProtocol": "SHA256",
"SnmpV3PrivProtocol": "AES",
"SnmpV3PrivPasswd": null,
"SNMPEncryptPwdInit": true,
"Deleteable": false,
"LoginRule": [],
"PasswordValidityDays": null,
"LoginAudit": {
"LastLoginTime": "",
"LastLoginIp": "",
"LastLoginInterface": ""
},
"Actions": {
"#Account.ImportMutualAuthClientCert": {
"target": "/redfish/v1/AccountService/Accounts/3/Oem/Public/Actions/Account.ImportMutualAuthClientCert",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/3/ImportMutualAuthClientCertActionInfo"
},
"#Account.DeleteMutualAuthClientCert": {
"target": "/redfish/v1/AccountService/Accounts/3/Oem/Public/Actions/Account.DeleteMutualAuthClientCert",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/3/DeleteMutualAuthClientCertActionInfo"
},
"#Account.ImportSSHPublicKey": {
"target": "/redfish/v1/AccountService/Accounts/3/Oem/Public/Actions/Account.ImportSSHPublicKey",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/3/ImportSSHPublicKeyActionInfo"
},
"#Account.DeleteSSHPublicKey": {
"target": "/redfish/v1/AccountService/Accounts/3/Oem/Public/Actions/Account.DeleteSSHPublicKey",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/3/DeleteSSHPublicKeyActionInfo"
}
}
}
},
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Operator"
}
}
}
]
}响应码:200
POST (CREATE)
命令功能
创建新用户
说明
创建用户成功之后,需等待约5秒之后才能生效。
命令格式
URL:https://device_ip/redfish/v1/AccountService/Accounts
请求头: X-Auth-Token: 123456789*********************** Content-Type: header_type
请求消息体:
json
{
"Id": user_id,
"UserName": username,
"Password": password,
"RoleId": role
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| user_id | 新建用户的Id | 可选参数,取值范围:2-17,不能和已存在用户的Id重复 |
| username | 新建用户的用户名 | 取值范围:1~16位的字符串。取值原则: ● 由特殊符号、英文字母和数字组成,不能包含空格且首字符不能是"#","+","-" ● 特殊字符不包括:" :<>&,'"/\% ● 用户名不能为"."或".." |
| password | 新建用户的密码 | 最大长度20的字符串。 ● 如果其他接口启用了密码复杂度检查功能,则设置和修改的密码必须遵循密码复杂度的规则 ● 如果其他接口未启用密码复杂度检查功能,则设置和修改的密码可以为任意字符 |
| role | 新建用户的角色 | 可设置的角色类型包括: ● Administrator ● Operator ● Commonuser ● Noaccess ● CustomRole1~CustomRole16 |
使用指南
创建用户成功之后,需等待约5秒之后才能生效。
使用实例
请求样例:
POST https://device_ip/redfish/v1/AccountService/Accounts
请求头:
X-Auth-Token: 123456789*********************** Content-Type: application/json
请求消息体:
json
{
"Id": "4",
"UserName": "username",
"Password": "password",
"RoleId": "Administrator"
}响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#ManagerAccount.ManagerAccount",
"@odata.id": "/redfish/v1/AccountService/Accounts/4",
"@odata.type": "#ManagerAccount.v1_0_2.ManagerAccount",
"Id": "4",
"Name": "User Account",
"Password": null,
"UserName": "username",
"RoleId": "Administrator",
"ReauthKey": "null",
"Locked": false,
"Enabled": true,
"Oem": {
"Public": {
"AccountInsecurePromptEnabled": false,
"FirstLoginPolicy": "ForcePasswordReset",
"SSHPublicKeyHash": null,
"LoginInterface": [
"Web",
"SNMP",
"IPMI",
"SSH",
"SFTP",
"Local",
"Redfish"
],
"SnmpV3AuthProtocol": "SHA256",
"SnmpV3PrivProtocol": "AES",
"SnmpV3PrivPasswd": null,
"SNMPEncryptPwdInit": false,
"Deleteable": false,
"LoginRule": [],
"PasswordValidityDays": 1,
"LoginAudit": {
"LastLoginTime": "",
"LastLoginIp": "",
"LastLoginInterface": ""
},
"Actions": {
"#Account.ImportMutualAuthClientCert": {
"target": "/redfish/v1/AccountService/Accounts/4/Oem/Public/Actions/Account.ImportMutualAuthClientCert",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/4/ImportMutualAuthClientCertActionInfo"
},
"#Account.DeleteMutualAuthClientCert": {
"target": "/redfish/v1/AccountService/Accounts/4/Oem/Public/Actions/Account.DeleteMutualAuthClientCert",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/4/DeleteMutualAuthClientCertActionInfo"
},
"#Account.ImportSSHPublicKey": {
"target": "/redfish/v1/AccountService/Accounts/4/Oem/Public/Actions/Account.ImportSSHPublicKey",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/4/ImportSSHPublicKeyActionInfo"
},
"#Account.DeleteSSHPublicKey": {
"target": "/redfish/v1/AccountService/Accounts/4/Oem/Public/Actions/Account.DeleteSSHPublicKey",
"@Redfish.ActionInfo": "/redfish/v1/AccountService/Accounts/4/DeleteSSHPublicKeyActionInfo"
}
}
}
},
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
}
}响应码:201