curl -X POST "http://localhost:5001/user/systemuids_remove" \
-H "Content-Type: application/json" \
-d '{
"uids": ["old_bot", "deprecated_service"]
}'
const response = await fetch('http://localhost:5001/user/systemuids_remove', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
uids: ['old_bot', 'deprecated_service']
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"uids": ["old_bot", "deprecated_service"]
}
response = requests.post('http://localhost:5001/user/systemuids_remove', json=data)
result = response.json()
print(result)
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]interface{}{
"uids": []string{"old_bot", "deprecated_service"},
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/user/systemuids_remove",
"application/json",
bytes.NewBuffer(jsonData),
)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"status": "ok"
}
用户管理
移除系统用户 ID
从系统用户 ID 列表中移除用户
POST
/
user
/
systemuids_remove
curl -X POST "http://localhost:5001/user/systemuids_remove" \
-H "Content-Type: application/json" \
-d '{
"uids": ["old_bot", "deprecated_service"]
}'
const response = await fetch('http://localhost:5001/user/systemuids_remove', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
uids: ['old_bot', 'deprecated_service']
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"uids": ["old_bot", "deprecated_service"]
}
response = requests.post('http://localhost:5001/user/systemuids_remove', json=data)
result = response.json()
print(result)
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]interface{}{
"uids": []string{"old_bot", "deprecated_service"},
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/user/systemuids_remove",
"application/json",
bytes.NewBuffer(jsonData),
)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"status": "ok"
}
概述
从系统用户 ID 列表中移除指定用户,取消其系统用户的特殊权限和标识。请求体
curl -X POST "http://localhost:5001/user/systemuids_remove" \
-H "Content-Type: application/json" \
-d '{
"uids": ["old_bot", "deprecated_service"]
}'
const response = await fetch('http://localhost:5001/user/systemuids_remove', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
uids: ['old_bot', 'deprecated_service']
})
});
const data = await response.json();
console.log(data);
import requests
data = {
"uids": ["old_bot", "deprecated_service"]
}
response = requests.post('http://localhost:5001/user/systemuids_remove', json=data)
result = response.json()
print(result)
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]interface{}{
"uids": []string{"old_bot", "deprecated_service"},
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"http://localhost:5001/user/systemuids_remove",
"application/json",
bytes.NewBuffer(jsonData),
)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"status": "ok"
}
响应字段
操作状态,成功时返回
"ok"状态码
| 状态码 | 说明 |
|---|---|
| 200 | 系统用户 ID 移除成功 |
| 400 | 请求参数错误 |
| 403 | 没有管理权限 |
| 404 | 指定用户不在系统用户列表中 |
| 500 | 服务器内部错误 |
⌘I

