获取当前用户对某用户的可见字段详情
适用版本>=v7.0.2603.20260326
接口说明:基于user_id获取当前用户对某用户的可见字段详情
标签:用户自定义字段
请求说明
| 字段 | 值 |
|---|---|
请求地址 | 配置域名+/openapi+/v7/users/{user_id}/read_visible_user_attr_details |
HTTP 方法 | GET |
接口描述 | 获取当前用户对某用户的可见字段详情(包含字段元信息和字段值),聚合了字段列表和字段值两个接口的能力 |
签名方式 | KSO-1(配置域名+/openapi不参与签名) |
限频策略 | 无 |
权限要求 | 查询和管理用户自定义字段(用户授权) kso.user_custom_attr.readwrite |
请求头 (Headers)
| 属性名 | 类型 | 是否必填 | 描述 | 可选值 |
|---|---|---|---|---|
X-Kso-Date | string | 是 | RFC1123 格式的日期,例: Wed, 23 Jan 2013 06:43:08 GMT | - |
X-Kso-Authorization | string | 是 | KSO-1 签名值,详见《签名方法》 | - |
Authorization | string | 是 | 授权凭证,格式为:Bearer {access_token} | - |
路径参数 (Path)
| 属性名 | 类型 | 是否必填 | 描述 | 可选值 |
|---|---|---|---|---|
user_id | string | 是 | 用户id,长度范围[1,128] | - |
查询参数 (Query)
| 属性名 | 类型 | 是否必填 | 描述 | 可选值 |
|---|---|---|---|---|
scene_type | string | 否 | 应用场景; 不传, 默认 general | general, business_card, search, personal_info |
type | object | 否 | 字段类型: 1-system 2-custom; 不传则查询所有 | - |
with_values | boolean | 否 | 是否包含字段值,默认为true。设为false时仅返回字段列表信息,不返回值 | - |
响应体(Response)
HTTP状态码: 200
响应体格式: application/json
没有可用的数据
响应体示例
json
{
"data": {
"attrs": [
{
"attr_meta": {
"ctime": 0,
"key": "string",
"modify_permissions_level": "none",
"mtime": 0,
"name": "string",
"options": [
{
"key": "string",
"name": "string"
}
],
"order": 0,
"scene_show": {
"card_show": "all_hidden",
"search_result_show": "all_hidden"
},
"show": "all_hidden",
"show_mutable": true,
"show_support_level": "global",
"value_type": "text"
},
"attr_value": {
"option": {
"key": "string",
"name": "string"
},
"relation_depts": [
{
"abs_path": "string",
"dept_name": "string",
"dimension": {
"ctime": 0,
"desc": "string",
"id": "string",
"mtime": 0,
"name": "string"
},
"id": "string"
}
],
"relation_mode": "general",
"relation_titles": [
{
"id": "string",
"name": "string"
}
],
"relation_user": {
"id": "string",
"name": "string"
},
"text": "string",
"url": {
"link": "string",
"title": "string"
}
},
"id": {
"attr_id": "string"
},
"type": "system"
}
],
"dept_attrs": [
{
"attrs": [
{
"attr_meta": {
"ctime": 0,
"key": "string",
"modify_permissions_level": "none",
"mtime": 0,
"name": "string",
"options": [
{
"key": "string",
"name": "string"
}
],
"order": 0,
"scene_show": {
"card_show": "all_hidden",
"search_result_show": "all_hidden"
},
"show": "all_hidden",
"show_mutable": true,
"show_support_level": "global",
"value_type": "text"
},
"attr_value": {
"option": {
"key": "string",
"name": "string"
},
"relation_depts": [
{
"abs_path": "string",
"dept_name": "string",
"dimension": {
"ctime": 0,
"desc": "string",
"id": "string",
"mtime": 0,
"name": "string"
},
"id": "string"
}
],
"relation_mode": "general",
"relation_titles": [
{
"id": "string",
"name": "string"
}
],
"relation_user": {
"id": "string",
"name": "string"
},
"text": "string",
"url": {
"link": "string",
"title": "string"
}
},
"id": {
"attr_id": "string"
},
"type": "system"
}
],
"dept_id": "string"
}
],
"total": 0,
"user_id": "string"
},
"code": 0,
"msg": "string"
}