更新用户组
PUT
/core/v1/usergroups
最后修改时间:2025-01-06 06:29:11
责任人:未设置
请求参数
Header 参数
X-Polaris-Token
string
鉴权凭据,必须传
Body 参数application/json
id
string
必需
name
string
必需
add_relation
object
必需
user_ids
array[string]
必需
remove_relation
object
必需
user_ids
array[string]
必需
示例
[
{
"id": "123",
"remove_relations": {
"group_id": "group_123",
"users": [
{
"id": "user_1",
"name": "User One",
"auth_token": "token_1"
}
]
},
"add_relations": {
"group_id": "group_456",
"users": [
{
"id": "user_2",
"name": "User Two",
"auth_token": "token_2"
}
]
}
}
]
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://119.91.66.223:8090/core/v1/usergroups' \
--header 'X-Polaris-Token;' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"id": "123",
"remove_relations": {
"group_id": "group_123",
"users": [
{
"id": "user_1",
"name": "User One",
"auth_token": "token_1"
}
]
},
"add_relations": {
"group_id": "group_456",
"users": [
{
"id": "user_2",
"name": "User Two",
"auth_token": "token_2"
}
]
}
}
]'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2025-01-06 06:29:11