列出工作区

OpenAPI 契约

方法
GET
路径
/api/v1/workspaces
认证
jwtBearer (bearer)
响应状态
200 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
  "requestBody": {},
  "responses": {
    "200": {
      "description": "Workspaces",
      "content": {
        "application/json": {
          "items": {
            "$ref": "#/components/schemas/WorkspaceResponse"
          },
          "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 仅限 JWT。服务会先确保账户拥有迁移后的个人组织和默认工作区,再返回当前账户可见的工作区。includeArchived 默认为 false;设为 true 可包含可见的已归档工作区。

每项包含工作区与组织的 ID 和名称、归档与个人工作区标志、调用方的有效工作区与组织角色、解析后的能力、成员和项目数量以及时间戳。nfy_ 自动化密钥不能调用此操作。

http
GET /api/v1/workspaces?includeArchived=false
Authorization: Bearer <JWT>