移除工作区人员

OpenAPI 契约

方法
DELETE
路径
/api/v1/workspaces/{id}/people/{personId}
认证
jwtBearer (bearer)
响应状态
204 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
  "requestBody": {},
  "responses": {
    "204": {
      "description": "Workspace person removed",
      "content": {}
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RequestError"
        }
      }
    },
    "401": {
      "description": "Authentication required or invalid",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "403": {
      "description": "Authenticated but not permitted",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "404": {
      "description": "Requested workspace resource was not found",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "409": {
      "description": "Request conflicts with current workspace state",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

DELETE /api/v1/workspaces/{id}/people/{personId} 仅限 JWT,并且需要 people:manage。对于有效成员,它会停用工作区成员关系,并删除该用户在此工作区中的直接项目授权;对于待处理邀请,它会把邀请记录为已撤销。成功响应没有正文。

服务拒绝移除工作区最后一名有效 ADMIN。人员不存在、成员关系无效或 ID 属于其他工作区时会报告未找到。