通过 OpenAPI 查询用户列表。
适用版本 | 企业专属版 |
服务接入点与授权信息
获取服务接入点,替换 API 请求语法中的 <domain> :服务接入点(domain)。
获取个人访问令牌,具体操作,请参见获取个人访问令牌。
请求语法
GET https://<domain>/oapi/v1/platform/users?filter=<filter>&status=enabled&deptId=<deptId>&page=<page>&perPage=<perPage>
请求头
参数 | 类型 | 是否必填 | 描述 | 示例值 |
x-yunxiao-token | string | 是 | 个人访问令牌。 | pt-0fh3****0fbG_35af****0484 |
请求参数
参数 | 类型 | 位置 | 是否必填 | 描述 | 示例值 |
filter | string | query | 否 | 查询信息,支持用户名、登录名、邮箱、手机号等信息的模糊搜索。 | |
status | string | query | 否 | 用户状态。 | |
deptId | string | query | 否 | 所属部门。 | |
page | integer | query | 否 | 当前页,默认1。 | |
perPage | integer | query | 否 | 每页数据条数,默认100。 |
请求示例
curl -X 'GET' \
'https://test.rdc.aliyuncs.com/oapi/v1/platform/users?filter=<filter>&status=enabled&deptId=<deptId>&page=<page>&perPage=<perPage>' \
-H 'accept: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
返回参数
参数 | 类型 | 描述 | 示例值 |
string | 邮箱。 | ||
id | string | 用户 ID。 | 8446****ce9f |
lastOrganization | string | 最后加入的组织。 | |
name | string | 名称。 | name1 |
nickName | string | 昵称。 | lingma |
staffId | string | 员工 ID。 | |
sysDeptIds | string | 部门 ID。 | |
username | string | 用户名。 |
返回示例
[
{
"email": "string",
"id": "8446****ce9f",
"lastOrganization": "string",
"name": "name1",
"nickName": "lingma",
"staffId": "string",
"sysDeptIds": [
"string"
],
"username": "string"
}
]
响应头
参数 | 描述 | 示例值 |
x-next-page | 下一页。 | 1 |
x-per-page | 每页数据条数。 | 100 |
x-prev-page | 上一页。 | 1 |
x-total | 总数据量。 | 2 |
x-total-pages | 总分页数。 | 1 |
响应头示例
connection: keep-alive
content-length: 481
content-type: application/json; charset=UTF-8
date: Thu,04 Jul 2024 13:44:21 GMT
x-next-page: 1
x-per-page: 100 //每页大小
x-prev-page: 1
x-total: 2 //总条数
x-total-pages: 1 //总页数
错误码
访问错误码中心查看 API 相关错误码。
文档内容是否对您有帮助?