Skip to content

批量更新用户的自定义属性值

适用版本>=v7.0.2409b.20240926

接口说明:批量更新用户的自定义属性值

请求说明

请求地址配置域名+/graph+/v7/users/custom_attrs/batch_update
请求方法POST
签名方式WPS-4签名/WPS-4-GM签名(配置域名+/graph不参与签名)
权限要求查询和管理用户自定义字段(企业授权) kso.user_custom_attr.readwrite

请求头(Header)

名称是否必填说明
Content-Type固定为: application/json
Wps-Docs-Date取当前时间,示例: Wed,23 Jan 2013 06:43:08 GMT
Wps-Docs-Authorization计算方法参考签名说明
Authorization授权凭证,格式为: Bearer {access_token}

请求体(Body)

名称类型是否必填说明
user_idsobject[]
custom_attrsobject[]用户自定义属性
attr_idstring自定义属性 id
optionstring选项
relation_deptsstring[]关联部门 id 列表
relation_userstring关联成员 id
textstring说明
urlobject网页
titlestring标题
linkstring链接

请求体示例

{
  "users": [
    {
      "custom_attrs": [
        {
          "attr_id": "string",
          "option": "string",
          "relation_depts": [
            "string"
          ],
          "relation_user": "string",
          "text": "string",
          "url": {
            "link": "string",
            "title": "string"
          }
        }
      ],
      "user_id": "string"
    }
  ]
}

响应体(Response)

名称类型说明
codeintegercode
detailstringdetail
msgstringmsg
dataobject返回信息体
usersobject[]用户列表
custom_attrsobject[]自定义属性列表
attr_idstring自定义属性 id
attr_namestring自定义属性名称
attr_value_typestring自定义属性值类型
optionstring自定义字段 type 为 option 时,展示的选项列表
relation_deptsstring[]自定义字段 type 为 relation_depts 时,展示的选项列表
relation_userstring自定义字段 type 为 relation_user 时,展示的选项列表
textstring自定义字段 type 为 text 时,展示的选项列表
urlobject自定义字段 type 为 url 时,展示的选项列表
titlestring标题
linkstring链接
user_idstring用户 id

响应体示例

{
  "data": {
    "users": [
      {
        "custom_attrs": [
          {
            "attr_id": "string",
            "attr_name": "string",
            "attr_value_type": "string",
            "option": "string",
            "relation_depts": ["string"],
            "relation_user": "string",
            "text": "string"
            "url": {
                "title": "string",
                "link": "string"
            }
          }
        ],
        "user_id": "string"
      }
    ]
  },
  "msg": "string",
  "code": 0
}