获取工作区

OpenAPI 契约

方法
GET
路径
/api/v1/workspaces/{id}
认证
jwtBearer (bearer)
响应状态
200 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
  "requestBody": {},
  "responses": {
    "200": {
      "description": "Workspace",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/WorkspaceResponse"
        }
      }
    },
    "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} 仅限 JWT,并且需要解析后的协作策略授予 workspace:read。响应包含与列表操作相同的工作区元数据、有效角色、能力、数量和时间戳。

服务器根据当前组织和工作区成员数据解析访问权限。超出调用方可见边界的工作区会被报告为未找到。nfy_ 自动化密钥不能调用此操作。