BatchReadUsers - 通过 id 或者 username 批量查询用户信息

通过 id 或者 username 批量查询用户信息。

服务接入点与授权信息

产品 资源 所需权限
基础服务 用户 只读

请求语法

POST https://{domain}/oapi/v1/platform/users:batchRead

请求头

参数 类型 是否必填 描述 示例值
x-yunxiao-token string 个人访问令牌。 pt-0fh3****0fbG_35af****0484

请求参数

参数 类型 位置 是否必填 描述 示例值
- object body
      userIds array[string] body 用户 ID 列表。 [99d1**6124]
      usernames array[string] body [testUsername]

请求示例

curl -X 'POST' \
  'https://test.rdc.aliyuncs.com/oapi/v1/platform/users:batchRead' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "userIds": [99d1****6124],
        "usernames": [testUsername]
    }'

返回参数

参数 类型 描述 示例值
- array
      - object
            email string 邮箱。 test**@example.com
            id string 用户 ID。 99d1**6124
            lastOrganization string 上次登录组织。 99d1**6124
            name string 显示名称。 示例用户名
            nickName string 昵称。 示例昵称
            staffId string 工号。 123**
            sysDeptIds array[string] 所属部门。 [99d1**6124]
            username string 登录账号名。 demo**username

返回示例

[
    {
        "email": "test****@example.com",
        "id": "99d1****6124",
        "lastOrganization": "99d1****6124",
        "name": "示例用户名",
        "nickName": "示例昵称",
        "staffId": "123****",
        "sysDeptIds": [99d1****6124],
        "username": "demo**username"
    }
]

错误码

访问错误码中心查看 API 相关错误码。

results matching ""

    No results matching ""