文档API 参考
Rust · 0.1.0
Decline Space Invitation
POST /api/v1/spaces/{space}/invitations/{invitation}:decline
SpaceService · SpaceService_DeclineSpaceInvitation
基于协议生成的参考。授权与实例策略仍然生效。结构描述继承自 MIT 许可的应用接口定义;本站不会向真实服务执行示例。
访问权限
只有已认证的受邀人能接受或拒绝;空间管理员不能代替其他用户回应邀请。
邀请绑定在路径,JSON 请求体为空
URL 提供邀请资源名,因此 REST JSON 请求体发送 {} 即可。接受会把待处理邀请转成有效成员资格并返回 SpaceMember;拒绝会移除待处理邀请并返回 {}。邀请处理后重复操作可能返回 NOT_FOUND;认定失败前先检查成员资格或邀请状态。
成功响应
此操作没有资源对象需要返回。Rust REST 传输将 protobuf Empty 序列化为 HTTP 200 与 JSON {}。生成接口定义中的成功结构为空是有意行为,不表示遗漏了请求说明。
请求
DeclineSpaceInvitation declines a pending invitation.
POST
/api/v1/spaces/{space}/invitations/{invitation}:decline参数
| 名称 / 位置 | 类型 / 是否必需 | 描述 |
|---|---|---|
spacepath | string 必需 | The space id. |
invitationpath | string 必需 | The invitation id. |
请求体
必需
application/json · DeclineSpaceInvitationRequest
响应
200 · OK
default · Default error response
application/json · Status
完整操作定义
下方保留全部已声明约束、媒体类型和响应细节。结构引用链接到完整定义。
展开 JSON 定义
{
"tags": [
"SpaceService"
],
"description": "DeclineSpaceInvitation declines a pending invitation.",
"operationId": "SpaceService_DeclineSpaceInvitation",
"parameters": [
{
"name": "space",
"in": "path",
"description": "The space id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "invitation",
"in": "path",
"description": "The invitation id.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeclineSpaceInvitationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}