批量获取用户的自定义属性值
批量获取用户的自定义属性值
请求说明
| 请求地址 | https://openapi.wps.cn/v7/users/custom_attrs/batch_read |
|---|---|
| 请求方法 | POST |
| 签名方式 | KSO-1 |
| 权限要求 | 查询和管理用户自定义字段(应用授权) kso.user_custom_attr.readwrite |
请求头(Header)
| Header 名称 | 参数类型 | 是否必填 | 说明 |
|---|---|---|---|
| Content-Type | string | 是 | 使用:application/json |
| X-Kso-Date | string | 是 | RFC1123 格式的日期,例: Wed, 23 Jan 2013 06:43:08 GMT |
| X-Kso-Authorization | string | 是 | KSO-1 签名值,详见《签名方法》 |
| Authorization | string | 是 | 授权凭证,格式为:Bearer {access_token} |
请求体(Body)
| 名称 | 参数类型 | 是否必填 | 说明 |
|---|---|---|---|
| user_ids | array[string] | 是 | 用户 id 列表 |
请求地址示例
[POST] https://openapi.wps.cn/v7/users/custom_attrs/batch_read请求体示例
json
{
"user_ids": ["string"]
}响应体
| 名称 | 参数类型 | 说明 |
|---|---|---|
| code | integer | 响应代码。非 0 表示失败,参照《状态码说明》 |
| msg | string | 响应信息 |
| data | object | 响应数据 |
| ∟ total | integer | |
| ∟ users | array[object] | 用户列表 |
| ∟ ∟ custom_attrs | array[object] | 用户自定义属性列表 |
| ∟ ∟ ∟ attr_id | string | 自定义属性 id |
| ∟ ∟ ∟ attr_name | string | 自定义属性名称 |
| ∟ ∟ ∟ option_key | string | 自定义字段 type 为 option 时,展示的选项列表 |
| ∟ ∟ ∟ relation_user | string | 自定义字段 type 为 relation_user 时,展示的选项列表 |
| ∟ ∟ ∟ text | string | 自定义字段 type 为 text 时,展示的选项列表 |
| ∟ ∟ user_id | string | 用户 id |
响应体示例
json
{
"data": {
"total": 0,
"users": [
{
"custom_attrs": [
{
"attr_id": "string",
"attr_name": "string",
"option_key": "string",
"relation_user": "string",
"text": "string"
}
],
"user_id": "string"
}
]
},
"msg": "string",
"code": 0
}