列出工作区人员

OpenAPI 契约

方法
GET
路径
/api/v1/workspaces/{id}/people
认证
jwtBearer (bearer)
响应状态
200 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
  "requestBody": {},
  "responses": {
    "200": {
      "description": "Workspace people",
      "content": {
        "application/json": {
          "items": {
            "$ref": "#/components/schemas/WorkspacePersonResponse"
          },
          "type": "array"
        }
      }
    },
    "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"
        }
      }
    }
  }
}

GET /api/v1/workspaces/{id}/people 仅限 JWT,并且需要工作区的 people:read。它先返回有效成员,再返回待处理邀请;两组都按创建时间排序。

每项包含 ID、type(MEMBER 或 INVITATION)、邮箱、工作区角色、status(ACTIVE 或 PENDING)和时间戳。有效成员还包含 userId 与显示名称;待处理邀请的这些字段为 null。不可访问的工作区不会被暴露。