-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API] 用户管理支持HTTP 数据源协议 #363
Labels
Comments
需要考虑, 如何确保数据一致性 a -> b -> c |
目前 环境, 调大 $ curl -X GET "http://127.0.0.1:8004/api/v2/departments/?page=1&page_size=100000&fields=name%2Ccode%2Cparent&best_match=false&time_field=create_time&lookup_field=category_id&exact_lookups=2" -H "accept: application/json" | jq curl -X GET "http://127.0.0.1:8004/api/v2/profiles/?page=1&page_size=1000&fields=username%2Ccode%2Cdisplay_name%2Cdepartments&lookup_field=category_id&exact_lookups=2&best_match=false&time_field=create_time&include_disabled=false" -H "accept: application/json" -H "X-CSRFToken: RAFRoeMfRLZ5P3DA9wgWi5WlDsS2Bgta4M6mxWGsZZKann7EJvQS8JUOaEqkBhGb" | jq
返回协议不符合要求, 要改
1. 没有返回code
2. departments 不是departments的code的列表
|
|
examples # departments
{
"count": 2,
"results": [
{
"name": "部门A",
"code": "3254854d4e7cbfd94a3a7ffe6fb0af9efbc6ea37cf5b25d4a2a63ece8d44bf42",
"parent": null
},
{
"name": "部门B",
"code": "f7897c3a552649c52301b1df07e0759a3e3d71d7ae53f3e30f188180f531ceb1",
"parent": null
}
]
}
# profiles
{
"count": 2,
"results": [
{
"username": "jack",
"display_name": "杰克",
"departments": [
"3254854d4e7cbfd94a3a7ffe6fb0af9efbc6ea37cf5b25d4a2a63ece8d44bf42"
],
"code": "c0d9714f4623c9b5ad7227cc04900cb22f6a113fbd1f8d6b0a3ac144abdac1b5"
},
{
"username": "tom",
"display_name": "汤姆",
"departments": [
"3254854d4e7cbfd94a3a7ffe6fb0af9efbc6ea37cf5b25d4a2a63ece8d44bf42",
"f7897c3a552649c52301b1df07e0759a3e3d71d7ae53f3e30f188180f531ceb1"
],
"code": "24309eccb2bd00601e8cfd5bf0f2c96b1a127c7c09eabdff2ad41644a81cb230"
}
]
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
用户: 两个环境之间用户管理的数据同步
协议: https://github.com/TencentBlueKing/bk-user/blob/master/src/api/bkuser_core/categories/plugins/custom/README.md
URL:
The text was updated successfully, but these errors were encountered: