获取账户列表
此方法可用于显示属于某公司的所有用户账户。
仅返回API密钥生成账户可见的账户。若无符合请求参数的用户账户,则返回空列表。
注意
当获取账户列表时,生成API密钥的账户 将被忽略 .
参数
|
参数 |
类型 |
可选 |
描述 |
|---|---|---|---|
|
|
字符串 |
是 |
需要显示账户的公司ID。 默认值:发起请求所用API密钥所属的公司。 |
|
|
数字 |
是 |
结果页码。
默认值:
|
|
|
数字 |
是 |
每页显示的项目数量。
可选值:
默认值:
|
返回值
此方法返回一个包含用户账户信息的对象。返回的对象包含:
|
属性 |
类型 |
描述 |
|---|---|---|
|
|
整数 |
当前显示的页码。 |
|
|
整数 |
可用总页数。 |
|
|
整数 |
每页显示的项目数量。 |
|
|
对象 |
用户账户列表。 |
|
|
字符串 |
用户账户ID。 |
|
|
字符串 |
与用户账户关联的电子邮件地址。 |
|
|
对象 |
包含用户账户信息的属性列表 |
|
|
字符串 |
与用户账户关联的姓名。 |
|
|
字符串 |
与用户账户关联的时区。 |
|
|
字符串 |
与用户账户关联的语言。 |
|
|
字符串 |
用户登录后跳转的页面 GravityZone . |
|
|
整数 |
表示分配给用户账户的角色。 可选值:
|
|
|
对象 |
表示用户被授予哪些权限的属性列表。 每个属性的可选值:
注意您可以在 createAccount . |
|
|
整数 |
表示分配给用户账户的密码过期策略。 可能取值:
默认值:
|
|
|
布尔值 |
若为
|
|
|
布尔值 |
若为true,表示该用户账户已启用双因素认证(2FA)。 |
|
|
字符串 |
用户账户所属公司名称。 |
|
|
字符串 |
用户账户所属公司的ID。 |
|
|
整型 |
用户登录所需的认证方式。 可选值:
|
|
|
整数 |
请求返回的条目数量。 |
示例
请求:
{
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
"jsonrpc": "2.0", "method": "getAccountsList",
"params": {
"perPage": 20,
"page": 1,
"companyId": "58541613aaed7090058b4567"
}
}
响应:
{
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
"jsonrpc": "2.0",
"result": {
"total": 2,
"page": 1,
"perPage": 20,
"pagesCount": 1,
"items": [
{
"id": "585d3170aaed70b7048b4633",
"email": "client@bitdefender.com",
"profile": {
"fullName": "Bitdefender 用户",
"language": "en_US",
"timezone": "Europe/Bucharest",
"landingPage": "dashboardV2"
},
"role": 5,
"rights": {
"companyManager": false,
"manageCompanies": false,
"manageNetworks": true,
"manageInventory ": true,
"managePoliciesRead": true,
"managePoliciesWrite": true,
"manageReports": true,
"manageUsers": true,
"manageRemoteShell":true
},
"companyName": "bitdefender",
"companyId": "58541613aaed7090058b4567",
"authenticationMethod": 0
},
{
"id": "585d3170aaed70b7048b4634",
"email": "client2@bitdefender.com",
"profile": {
"fullName": "Bitdefender 用户",
"language": "en_US",
"timezone": "Europe/Bucharest"
},
"role": 1,
"rights": {
"companyManager": true,
"manageCompanies": false,
"manageNetworks": true,
"manageInventory ": true,
"managePoliciesRead": true,
"managePoliciesWrite": true,
"manageReports": true,
"manageUsers": true,
"manageRemoteShell":true
},
"passwordLifetime": 0,
"accountLockdown": false,
"twoFactorAuthenticationStatus": true,
"companyName": "bitdefender",
"companyId": "58541613aaed7090058b4567",
"authenticationMethod": 0
}
]
}
}