通过 OpenAPI 搜索成员列表。
适用版本 | 中心版、Region版 |
服务接入点与授权信息
产品 | 资源 | 所需权限 |
组织管理 | 组织成员 | 只读 |
请求语法
中心版
POST https://{domain}/oapi/v1/platform/organizations/{organizationId}/members:searchRegion版
POST https://{domain}/oapi/v1/platform/members:search请求头
参数 | 类型 | 是否必填 | 描述 | 示例值 |
x-yunxiao-token | string | 是 | 个人访问令牌。 | pt-0fh3****0fbG_35af****0484 |
请求参数
参数 | 类型 | 位置 | 是否必填 | 描述 | 示例值 |
organizationId | string | path |
| 所属组织 ID。 | |
| - | object | body | 否 | ||
deptIds | array[string] | body | 否 | 所属部门列表,默认可空。 | ["99d1****6124"] |
includeChildren | boolean | body | 否 | [标准版不适用]是否包含子部门,默认 false,不包含;当 deptIds 为空时,该字段无意义。 | false |
nextToken | string | body | 否 | ||
page | integer | body | 否 | 页码,从1开始,默认1。 | 1 |
perPage | integer | body | 否 | 1<=perPage<=100,默认100。 | 100 |
query | string | body | 否 | 查询参数。 | phw |
roleIds | array[string] | body | 否 | 角色列表,默认可空。 | ["99d1****6124"] |
statuses | array[string] | body | 否 | 成员状态过滤,默认返回状态为 ENABLED 的成员。可选值:ENABLED,DISABLED,UNDELETED,DELETED,NORMAL_USING,UNVISITED。ENABLED=NORMAL_USING+UNVISITED;UNDELETED=ENABLED+DISABLED。 | ["ENABLED"] |
请求示例
中心版
curl -X 'POST' \
'https://{domain}/oapi/v1/platform/organizations/{organizationId}/members:search' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"deptIds": ["99d1****6124"],
"includeChildren": false,
"nextToken": "",
"page": 1,
"perPage": 100,
"query": "phw",
"roleIds": ["99d1****6124"],
"statuses": ["ENABLED"]
}'Region版
curl -X 'POST' \
'https://{domain}/oapi/v1/platform/members:search' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"deptIds": ["99d1****6124"],
"includeChildren": false,
"nextToken": "",
"page": 1,
"perPage": 100,
"query": "phw",
"roleIds": ["99d1****6124"],
"statuses": ["ENABLED"]
}'返回参数
参数 | 类型 | 描述 | 示例值 |
| - | array | ||
| - | object | ||
deptIds | array[string] | 所属组织部门列表。 | ["99d1****6124"] |
string | 邮箱。 | example@example.com | |
id | string | 成员 ID。 | 99d1****6124 |
joined | string | 加入时间。 | 2023-08-31T03:59:16.201Z |
lastUpdated | string | 最后更新时间,等于数据库的更新时间。 | 2023-08-31T03:59:16.201Z |
name | string | 成员名。 | 示例名 |
organizationId | string | 组织 ID。 | 99d1****6124 |
roleIds | array[string] | 角色信息。 | ["99d1****6124"] |
status | string | 成员状态,可选值:ENABLED,DISABLED,UNDELETED,DELETED,NORMAL_USING,UNVISITED。 | ENABLED |
userId | string | 用户 ID。 | 99d1****6124 |
visited | string | 最后访问时间。 | 2023-08-31T03:59:16.201Z |
返回示例
[
{
"deptIds": ["99d1****6124"],
"email": "example@example.com",
"id": "99d1****6124",
"joined": "2023-08-31T03:59:16.201Z",
"lastUpdated": "2023-08-31T03:59:16.201Z",
"name": "示例名",
"organizationId": "99d1****6124",
"roleIds": ["99d1****6124"],
"status": "ENABLED",
"userId": "99d1****6124",
"visited": "2023-08-31T03:59:16.201Z"
}
]响应头
参数 | 描述 | 示例值 |
x-next-page | 下一页。 | |
x-page | 当前页。 | |
x-per-page | 每页数据条数。 | |
x-prev-page | 上一页。 | |
x-total | 总数据量。 | |
x-total-pages | 总分页数。 |
错误码
访问错误码中心查看 API 相关错误码。