Get Manageable User List¶
获取当前账号权限下可管理的所有用户列表。
前提条件¶
用户已登录应用门户,并进入一个 OU。如有需要,可通过 Log In API 登录应用门户,通过 Choose Organization API 选择 OU。
用户账号需要有 OU 管理员或子管理员权限。如有需要,联系系统管理员或 OU 管理员获取权限。
请求格式¶
POST https://{apigw-address}/app-portal-service/v2.2/organization/user/list
请求参数(Header)¶
名称 |
必需/可选 |
数据类型 |
描述 |
---|---|---|---|
Authorization |
必需 |
String |
用户登录并选择 OU 后生成的 Access Token,以 Bearer Token 表示,其形式为 |
请求参数(Body)¶
名称 |
必需/可选 |
数据类型 |
描述 |
---|---|---|---|
pagination |
必需 |
Pagination 请求结构体 |
分页参数。Pagination 请求参数 >> |
响应参数¶
名称 |
数据类型 |
描述 |
---|---|---|
pagination |
Pagination 结构体。 |
分页信息。Pagination 返回结构体 >> |
users |
List<JSONObject> |
用户信息列表。用户信息结构体 >> |
Pagination 返回结构体¶
名称 |
数据类型 |
描述 |
---|---|---|
pageNo |
Integer |
请求页数。 |
pageSize |
Integer |
每页记录数。 |
totalElements |
Long |
总记录数。 |
用户信息结构体 ¶
名称 |
数据类型 |
描述 |
---|---|---|
id |
String |
用户 ID。 |
name |
String |
用户名称。 |
domain |
String |
域名称。仅当用户为域用户时返回。 |
description |
String |
用户描述。 |
nickName |
String |
用户昵称。 |
phoneArea |
String |
用户注册电话的区号。 |
phone |
String |
用户的注册手机号码。 |
String |
用户的注册邮箱。 |
|
createdTime |
String |
用户账号创建时间。 |
joinTime |
String |
用户加入当前 OU 的时间。 |
type |
Integer |
用户账号类型。 |
exists |
Boolean |
固定返回 |
updatedTime |
String |
用户的更新时间。 |
错误码¶
代码 |
错误信息 |
描述 |
---|---|---|
31400 |
Pagination is required |
分页参数不能为空 |
31403 |
Need the primary admin permission |
用户需要有 OU 管理员权限才能查询可管理的用户列表 |
31512 |
Organization unselected |
未选择 OU |
示例¶
请求示例¶
url: https://{apigw-address}/app-portal-service/v2.2/organization/user/list
method: POST
headers: {"Authorization":"Bearer your_token"}
requestBody:
{
"pagination": {
"pageNo":0,
"pageSize":5,
"sorters":[]
}
}
返回示例¶
{
"code": 0,
"message": "OK",
"data": {
"pagination": {
"totalElements": 5,
"pageNo": 0,
"pageSize": 5
},
"users": [
{
"id": "your_user_id_1",
"name": "your_user_name_1",
"domain": "your_user_domain_1",
"description": "",
"nickName": "",
"phoneArea": "",
"phone": "",
"email": "your_user_email_1",
"createdTime": "2019-09-23 02:32:51.0",
"joinTime": "2019-09-23 02:32:52.0",
"type": 1,
"exists": null,
"updatedTime": "2019-09-23 02:32:52.0"
},
{
"id": "your_user_id_2",
"name": "your_user_name_2",
"domain": "your_user_domain_2",
"description": "",
"nickName": "",
"phoneArea": "",
"phone": "",
"email": "your_user_email_2",
"createdTime": "2019-09-20 06:46:34.0",
"joinTime": "2019-09-20 06:46:34.0",
"type": 1,
"exists": null,
"updatedTime": "2019-09-23 02:32:52.0"
},
{
"id": "your_user_id_3",
"name": "your_user_name_3",
"domain": "your_user_domain_3",
"description": "",
"nickName": "",
"phoneArea": "",
"phone": "",
"email": "your_user_email_3",
"createdTime": "2019-09-19 08:24:17.0",
"joinTime": "2019-09-19 08:24:17.0",
"type": 0,
"exists": null,
"updatedTime": "2019-09-23 02:32:52.0"
},
{
"id": "your_user_id_4",
"name": "your_user_name_4",
"domain": "your_user_domain_4",
"description": "",
"nickName": "",
"phoneArea": "",
"phone": "",
"email": "your_user_email_4",
"createdTime": "2019-05-30 07:41:31.0",
"joinTime": "2019-09-11 09:42:54.0",
"type": 0,
"exists": null,
"updatedTime": "2019-09-23 02:32:52.0"
},
{
"id": "your_user_id_5",
"name": "your_user_name_5",
"domain": "your_user_domain_5",
"description": "",
"nickName": "",
"phoneArea": "",
"phone": "",
"email": "your_user_email_5",
"createdTime": "2019-05-14 08:38:31.0",
"joinTime": "2019-09-06 14:09:01.0",
"type": 0,
"exists": null,
"updatedTime": "2019-09-23 02:32:52.0"
}
]
}
}