SpaceService · SpaceService_CreateSpaceInvitation
基于协议生成的参考。授权与实例策略仍然生效。结构描述继承自 MIT 许可的应用接口定义;本站不会向真实服务执行示例。
访问权限
需要有效成员的空间 ADMIN 角色;不是空间管理员的实例管理员不能执行这些管理操作。
邀请已有账号
发送 SpaceInvitation 请求体,invitee 使用 users/{username},role 为 ADMIN 或 USER。受邀账号必须有效。已有成员资格或待处理邀请会产生 ALREADY_EXISTS。返回的邀请名以受邀用户名结尾,不是任意邀请 ID。
请求
CreateSpaceInvitation invites an existing active user to a space.
POST
/api/v1/spaces/{space}/invitations参数
| 名称 / 位置 | 类型 / 是否必需 | 描述 |
|---|---|---|
spacepath | string 必需 | The space id. |
请求体
必需
application/json · SpaceInvitation
响应
200 · OK
application/json · SpaceInvitation
default · Default error response
application/json · Status
完整操作定义
下方保留全部已声明约束、媒体类型和响应细节。结构引用链接到完整定义。
展开 JSON 定义
{
"tags": [
"SpaceService"
],
"description": "CreateSpaceInvitation invites an existing active user to a space.",
"operationId": "SpaceService_CreateSpaceInvitation",
"parameters": [
{
"name": "space",
"in": "path",
"description": "The space id.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SpaceInvitation"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SpaceInvitation"
}
}
}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}