删除建群白名单
1. 接口定位
- 接口名称: 删除建群白名单
- 所属域: admin/group
- 业务目标: 将指定用户从建群白名单中移除
2. 请求定义
- Method:
POST - Path:
/adminx/group/create_permission/del - Content-Type: 推荐
application/json - operationID: 必填,请通过 Header
operationID传入 - 鉴权: 需要 Header
token,且必须是管理员 token - 幂等性: 非幂等
3. 请求参数
Header 参数
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| operationID | 是 | string | 链路追踪 ID |
| token | 是 | string | 管理员 token |
Body 参数
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| userIDs | 是 | array<string> | 待移除的用户 ID 列表 |
4. 响应结构
通用响应包裹
| 字段 | 类型 | 说明 |
|---|---|---|
| errCode | int | 错误码,0 表示成功 |
| errMsg | string | 错误简述 |
| errDlt | string | 错误详情 |
| data | object | 业务数据 |
data 字段
- 成功时返回空对象。
5. 业务规则
- 请求中的所有
userID都必须已存在于白名单中。 - 若部分用户不在白名单中,返回
user id not in group create whitelist。 - 删除前会先批量查询现有白名单记录做一致性校验。
6. 错误码与失败场景
| 错误码 | 场景 | 典型报错 |
|---|---|---|
| 1001 | Header 缺少 operationID | header must have operationID |
| 1004 | 某些用户不在建群白名单中 | user id not in group create whitelist |
| - | 缺少管理员 token | 由管理员鉴权链路返回 |
| - | 白名单查询或删除失败 | 由存储链路返回 |
7. 示例
fetch 请求示例
javascript
fetch("http://localhost:10011/adminx/group/create_permission/del", {
method: "POST",
headers: {
operationID: "group-create-permission-del-001",
token: "eyJhbGciOi...",
"Content-Type": "application/json",
},
body: JSON.stringify({
userIDs: ["user_001", "user_002"],
}),
})
.then((res) => res.json())
.then((data) => console.log(data));请求示例(JSON)
json
{
"userIDs": ["user_001", "user_002"]
}成功响应示例
json
{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {}
}8. 时序流程
- 中间件校验管理员 token。
- 查询待删除用户的建群白名单记录。
- 若存在缺失用户,直接返回失败。
- 批量删除对应白名单记录。
9. 变更记录
- 2026-04-06: 补全文档结构,修正真实服务前缀为
/adminx。