参考 API 密钥, 需要确保 API 密钥设置的角色具有用户数据同步权限。
curl 'https://localhost:13000/api/userData:push' \ -H 'Authorization: Bearer <token>' \ --data-raw '{"dataType":"user","records":[]}' # 请求体见下文详细说明
POST /api/userData:push
dataType
'user' | 'department'
user
matchKey
'username' | 'email' | 'phone'
records
UserRecord[]
uid
string
nickname
username
email
phone
departments
string[]
isDeleted
boolean
<field>
any
推送部门数据的前提是安装并开启部门插件。
department
DepartmentRecord[]
title
parentUid
:::info