UserService · UserService_DeleteUser
基于协议生成的参考。授权与实例策略仍然生效。结构描述继承自 MIT 许可的应用接口定义;本站不会向真实服务执行示例。
访问权限
需要指定账号的所有者或实例管理员;字段和生命周期限制仍然适用,所有者权限不代表可以修改管理员专用字段。
删除前先退出空间
账号必须先退出所有非邀请状态的空间成员资格。删除会移除其笔记、附件、令牌与设置、身份、通知等所属记录。force 不会绕过此前置条件。这是永久账号与内容删除,账号已删除后仍可能发生存储清理错误。
成功响应
此操作没有资源对象需要返回。Rust REST 传输将 protobuf Empty 序列化为 HTTP 200 与 JSON {}。生成接口定义中的成功结构为空是有意行为,不表示遗漏了请求说明。
请求
DeleteUser deletes a user.
DELETE
/api/v1/users/{user}参数
| 名称 / 位置 | 类型 / 是否必需 | 描述 |
|---|---|---|
userpath | string 必需 | The user id. |
forcequery | boolean OpenAPI 未标记为必需 | Optional. If set to true, the user will be deleted even if they have associated data. |
请求体
未声明请求体。
响应
200 · OK
default · Default error response
application/json · Status
完整操作定义
下方保留全部已声明约束、媒体类型和响应细节。结构引用链接到完整定义。
展开 JSON 定义
{
"tags": [
"UserService"
],
"description": "DeleteUser deletes a user.",
"operationId": "UserService_DeleteUser",
"parameters": [
{
"name": "user",
"in": "path",
"description": "The user id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "force",
"in": "query",
"description": "Optional. If set to true, the user will be deleted even if they have associated data.",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}