{
 "openapi": "3.1.1",
 "info": {
  "title": "루첼라 API — DataBridge API",
  "version": "2026-10-21",
  "description": "DataBridge API. 인증은 머리말 X-Lucela-API-Key 하나, 성공·오류는 같은 네 칸 봉투(status · data · error · meta)."
 },
 "servers": [
  {
   "url": "https://apis.lucela.kr"
  }
 ],
 "tags": [
  {
   "name": "DataBridge API",
   "description": "숨표AI 시험셋 · 이용 조건 · 품질"
  }
 ],
 "paths": {
  "/v1/bridge/datasets": {
   "get": {
    "tags": [
     "DataBridge API"
    ],
    "summary": "시험셋 목록",
    "description": "숨표AI 시험셋 목록",
    "operationId": "get_v1_bridge_datasets",
    "x-lucela-mcp-tool": "databridge_list_datasets",
    "security": [
     {
      "ApiKey": []
     }
    ],
    "x-implementation-status": "SANDBOX_ONLY",
    "x-lucela-billing-unit": "성공 페이지 1",
    "x-lucela-unit-weight": 1,
    "x-lucela-response-fields": "data[](dataset_id · title · summary · tier · synthetic · status · updated_at) · meta(request_id · environment · synthetic · schema_version · warnings · page(next_cursor · limit))",
    "responses": {
     "200": {
      "description": "성공 — 봉투 한 모양",
      "content": {
       "application/json": {
        "schema": {
         "allOf": [
          {
           "$ref": "#/components/schemas/Envelope"
          },
          {
           "type": "object",
           "properties": {
            "data": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "dataset_id": {},
               "title": {},
               "summary": {},
               "tier": {},
               "synthetic": {},
               "status": {},
               "updated_at": {}
              },
              "required": [
               "dataset_id",
               "title",
               "summary",
               "tier",
               "synthetic",
               "status",
               "updated_at"
              ]
             }
            },
            "meta": {
             "type": "object",
             "properties": {
              "request_id": {},
              "environment": {},
              "synthetic": {},
              "schema_version": {},
              "warnings": {},
              "page": {
               "type": "object",
               "properties": {
                "next_cursor": {},
                "limit": {}
               },
               "required": [
                "next_cursor",
                "limit"
               ]
              }
             },
             "required": [
              "request_id",
              "environment",
              "synthetic",
              "schema_version",
              "warnings",
              "page"
             ]
            }
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/E400"
     },
     "401": {
      "$ref": "#/components/responses/E401"
     },
     "403": {
      "$ref": "#/components/responses/E403"
     },
     "429": {
      "$ref": "#/components/responses/E429"
     },
     "503": {
      "$ref": "#/components/responses/E503"
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100
      },
      "description": "정수 1~100 · 기본 20"
     },
     {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "앞 응답의 meta.page.next_cursor"
     }
    ]
   }
  },
  "/v1/bridge/datasets/{dataset_id}": {
   "get": {
    "tags": [
     "DataBridge API"
    ],
    "summary": "시험셋 상세",
    "description": "시험셋 메타",
    "operationId": "get_v1_bridge_datasets_dataset_id",
    "x-lucela-mcp-tool": "databridge_get_dataset",
    "security": [
     {
      "ApiKey": []
     }
    ],
    "x-implementation-status": "SANDBOX_ONLY",
    "x-lucela-billing-unit": "성공 응답 1",
    "x-lucela-unit-weight": 1,
    "x-lucela-response-fields": "data(dataset_id · title · summary · tier · synthetic · status · updated_at · license_policy_id · versions[](version · sha256 · row_count · status · created_at)) · meta(request_id · environment · synthetic · schema_version · warnings)",
    "responses": {
     "200": {
      "description": "성공 — 봉투 한 모양",
      "content": {
       "application/json": {
        "schema": {
         "allOf": [
          {
           "$ref": "#/components/schemas/Envelope"
          },
          {
           "type": "object",
           "properties": {
            "data": {
             "type": "object",
             "properties": {
              "dataset_id": {},
              "title": {},
              "summary": {},
              "tier": {},
              "synthetic": {},
              "status": {},
              "updated_at": {},
              "license_policy_id": {},
              "versions": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "version": {},
                 "sha256": {},
                 "row_count": {},
                 "status": {},
                 "created_at": {}
                },
                "required": [
                 "version",
                 "sha256",
                 "row_count",
                 "status",
                 "created_at"
                ]
               }
              }
             },
             "required": [
              "dataset_id",
              "title",
              "summary",
              "tier",
              "synthetic",
              "status",
              "updated_at",
              "license_policy_id",
              "versions"
             ]
            },
            "meta": {
             "type": "object",
             "properties": {
              "request_id": {},
              "environment": {},
              "synthetic": {},
              "schema_version": {},
              "warnings": {}
             },
             "required": [
              "request_id",
              "environment",
              "synthetic",
              "schema_version",
              "warnings"
             ]
            }
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/E400"
     },
     "401": {
      "$ref": "#/components/responses/E401"
     },
     "403": {
      "$ref": "#/components/responses/E403"
     },
     "404": {
      "$ref": "#/components/responses/E404"
     },
     "429": {
      "$ref": "#/components/responses/E429"
     },
     "503": {
      "$ref": "#/components/responses/E503"
     }
    },
    "parameters": [
     {
      "name": "dataset_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/bridge/datasets/{dataset_id}/license": {
   "get": {
    "tags": [
     "DataBridge API"
    ],
    "summary": "이용 조건",
    "description": "권리 판정(ALLOWED · DENIED · UNKNOWN)",
    "operationId": "get_v1_bridge_datasets_dataset_id_license",
    "x-lucela-mcp-tool": "databridge_get_dataset_license",
    "security": [
     {
      "ApiKey": []
     }
    ],
    "x-implementation-status": "SANDBOX_ONLY",
    "x-lucela-billing-unit": "성공 응답 1",
    "x-lucela-unit-weight": 1,
    "x-lucela-response-fields": "data(dataset_id · license_policy_id · title · review_status · rights(commercial_use · redistribution · api_resale · derivative · modification · ai_training · caching · sublicense · attribution_free · territory_kr)) · meta(request_id · environment · synthetic · schema_version · warnings)",
    "responses": {
     "200": {
      "description": "성공 — 봉투 한 모양",
      "content": {
       "application/json": {
        "schema": {
         "allOf": [
          {
           "$ref": "#/components/schemas/Envelope"
          },
          {
           "type": "object",
           "properties": {
            "data": {
             "type": "object",
             "properties": {
              "dataset_id": {},
              "license_policy_id": {},
              "title": {},
              "review_status": {},
              "rights": {
               "type": "object",
               "properties": {
                "commercial_use": {},
                "redistribution": {},
                "api_resale": {},
                "derivative": {},
                "modification": {},
                "ai_training": {},
                "caching": {},
                "sublicense": {},
                "attribution_free": {},
                "territory_kr": {}
               },
               "required": [
                "commercial_use",
                "redistribution",
                "api_resale",
                "derivative",
                "modification",
                "ai_training",
                "caching",
                "sublicense",
                "attribution_free",
                "territory_kr"
               ]
              }
             },
             "required": [
              "dataset_id",
              "license_policy_id",
              "title",
              "review_status",
              "rights"
             ]
            },
            "meta": {
             "type": "object",
             "properties": {
              "request_id": {},
              "environment": {},
              "synthetic": {},
              "schema_version": {},
              "warnings": {}
             },
             "required": [
              "request_id",
              "environment",
              "synthetic",
              "schema_version",
              "warnings"
             ]
            }
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/E400"
     },
     "401": {
      "$ref": "#/components/responses/E401"
     },
     "403": {
      "$ref": "#/components/responses/E403"
     },
     "404": {
      "$ref": "#/components/responses/E404"
     },
     "429": {
      "$ref": "#/components/responses/E429"
     },
     "503": {
      "$ref": "#/components/responses/E503"
     }
    },
    "parameters": [
     {
      "name": "dataset_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/bridge/datasets/{dataset_id}/quality": {
   "get": {
    "tags": [
     "DataBridge API"
    ],
    "summary": "품질",
    "description": "최근 품질 검사 결과",
    "operationId": "get_v1_bridge_datasets_dataset_id_quality",
    "x-lucela-mcp-tool": "databridge_get_dataset_quality",
    "security": [
     {
      "ApiKey": []
     }
    ],
    "x-implementation-status": "SANDBOX_ONLY",
    "x-lucela-billing-unit": "성공 응답 1",
    "x-lucela-unit-weight": 1,
    "x-lucela-response-fields": "data(dataset_id · latest_verdict · runs[](version · verdict · checks · ran_at)) · meta(request_id · environment · synthetic · schema_version · warnings)",
    "responses": {
     "200": {
      "description": "성공 — 봉투 한 모양",
      "content": {
       "application/json": {
        "schema": {
         "allOf": [
          {
           "$ref": "#/components/schemas/Envelope"
          },
          {
           "type": "object",
           "properties": {
            "data": {
             "type": "object",
             "properties": {
              "dataset_id": {},
              "latest_verdict": {},
              "runs": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "version": {},
                 "verdict": {},
                 "checks": {},
                 "ran_at": {}
                },
                "required": [
                 "version",
                 "verdict",
                 "checks",
                 "ran_at"
                ]
               }
              }
             },
             "required": [
              "dataset_id",
              "latest_verdict",
              "runs"
             ]
            },
            "meta": {
             "type": "object",
             "properties": {
              "request_id": {},
              "environment": {},
              "synthetic": {},
              "schema_version": {},
              "warnings": {}
             },
             "required": [
              "request_id",
              "environment",
              "synthetic",
              "schema_version",
              "warnings"
             ]
            }
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/E400"
     },
     "401": {
      "$ref": "#/components/responses/E401"
     },
     "403": {
      "$ref": "#/components/responses/E403"
     },
     "404": {
      "$ref": "#/components/responses/E404"
     },
     "429": {
      "$ref": "#/components/responses/E429"
     },
     "503": {
      "$ref": "#/components/responses/E503"
     }
    },
    "parameters": [
     {
      "name": "dataset_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  }
 },
 "components": {
  "securitySchemes": {
   "ApiKey": {
    "type": "apiKey",
    "in": "header",
    "name": "X-Lucela-API-Key"
   },
   "LucelaDelegation": {
    "type": "oauth2",
    "description": "손님 위임 토큰 — 인가 코드 + PKCE(S256). 개인 자료는 이 토큰으로만 엽니다.",
    "flows": {
     "authorizationCode": {
      "authorizationUrl": "https://auth.lucela.kr/realms/lucela/protocol/openid-connect/auth",
      "tokenUrl": "https://auth.lucela.kr/realms/lucela/protocol/openid-connect/token",
      "refreshUrl": "https://auth.lucela.kr/realms/lucela/protocol/openid-connect/token",
      "scopes": {
       "openid": "회원번호(이 앱 전용)",
       "lucela.name.read": "이름",
       "email": "이메일",
       "soompyo.birth.read": "출생 연월일 · 태어난 시 · 양력/음력 · 성별"
      }
     }
    }
   },
   "AtelierProductToken": {
    "type": "http",
    "scheme": "bearer",
    "bearerFormat": "lcpt_",
    "description": "아틀리에 상품등록 토큰 — 범위: atelier.products:read · atelier.products:write · atelier.products:submit · atelier.catalog:review · atelier.catalog:publish · atelier.purchases:read · atelier.purchases:write · atelier.library:download"
   },
   "DirectDelegation": {
    "type": "http",
    "scheme": "bearer",
    "bearerFormat": "lcdd.",
    "description": "루첼라 다이렉트 연결 토큰 — https://direct.lucela.kr/connections 에서 발급 · 실제 키(X-Lucela-API-Key)와 함께 보낸다"
   }
  },
  "schemas": {
   "Envelope": {
    "type": "object",
    "required": [
     "status",
     "data",
     "error",
     "meta"
    ],
    "properties": {
     "status": {
      "const": "ok"
     },
     "data": {},
     "error": {
      "type": "null"
     },
     "meta": {
      "type": "object",
      "properties": {
       "request_id": {
        "type": "string"
       },
       "environment": {
        "enum": [
         "SANDBOX",
         "LIVE"
        ]
       },
       "synthetic": {
        "type": "boolean"
       },
       "schema_version": {
        "type": "string"
       },
       "warnings": {
        "type": "array",
        "items": {}
       }
      }
     }
    }
   },
   "ErrorEnvelope": {
    "type": "object",
    "required": [
     "status",
     "data",
     "error",
     "meta"
    ],
    "properties": {
     "status": {
      "const": "error"
     },
     "data": {
      "type": "null"
     },
     "error": {
      "type": "object",
      "required": [
       "code",
       "title",
       "status",
       "type",
       "detail",
       "instance"
      ],
      "properties": {
       "code": {
        "enum": [
         "ambiguous_birth_place",
         "approval_required",
         "birth_place_required",
         "birth_time_required",
         "consent_required",
         "contract_required",
         "delegation_required",
         "dependency_unavailable",
         "dpa_required",
         "engine_unavailable",
         "environment_mismatch",
         "idempotency_conflict",
         "insufficient_scope",
         "invalid_answers",
         "invalid_credential",
         "invalid_date",
         "invalid_features",
         "invalid_longitude",
         "invalid_time",
         "malformed_request",
         "media_not_ready",
         "method_not_allowed",
         "not_owner",
         "payload_too_large",
         "precondition_required",
         "processing_timeout",
         "provision_ack_required",
         "purpose_not_allowed",
         "quota_exhausted",
         "rate_limited",
         "resource_expired",
         "resource_not_found",
         "rights_denied",
         "sandbox_requires_fixture",
         "scale_version_mismatch",
         "scope_required",
         "service_paused",
         "source_failed",
         "state_conflict",
         "subject_age_not_supported",
         "time_nonexistent",
         "unknown_city_code",
         "unsafe_content",
         "unsupported_calendar",
         "unsupported_capability",
         "unsupported_jasi_method",
         "unsupported_lunar_basis",
         "unsupported_ruleset",
         "unsupported_timezone",
         "validation_blocked",
         "version_conflict"
        ]
       },
       "title": {
        "type": "string"
       },
       "status": {
        "type": "integer"
       },
       "type": {
        "type": "string"
       },
       "detail": {
        "type": "string"
       },
       "instance": {
        "type": "string",
        "format": "uri"
       },
       "field": {
        "type": "string"
       }
      }
     },
     "meta": {
      "type": "object",
      "properties": {
       "request_id": {
        "type": "string"
       }
      }
     }
    }
   }
  },
  "responses": {
   "E400": {
    "description": "malformed_request: 요청 형식이 맞지 않습니다 · provision_ack_required: 제공 개시 확인이 필요합니다",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/ErrorEnvelope"
      }
     }
    }
   },
   "E401": {
    "description": "invalid_credential: 인증할 수 없습니다",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/ErrorEnvelope"
      }
     }
    }
   },
   "E403": {
    "description": "scope_required: 이 키로는 쓸 수 없는 기능입니다 · contract_required: 이용 계약이 필요합니다 · rights_denied: 제공할 수 없는 자료입니다 · environment_mismatch: 환경이 맞지 않습니다 · dpa_required: 처리 위탁 문서 동의가 필요합니다 · delegation_required: 손님 위임 토큰이 필요합니다 · insufficient_scope: 허락받지 않은 범위입니다 · not_owner: 이 자료의 주인이 아닙니다 · approval_required: 사람 승인이 필요합니다",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/ErrorEnvelope"
      }
     }
    }
   },
   "E404": {
    "description": "resource_not_found: 찾을 수 없습니다",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/ErrorEnvelope"
      }
     }
    }
   },
   "E429": {
    "description": "rate_limited: 요청이 너무 잦습니다 · quota_exhausted: 포함량을 모두 썼습니다",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/ErrorEnvelope"
      }
     }
    }
   },
   "E503": {
    "description": "engine_unavailable: 계산 엔진을 쓸 수 없습니다 · dependency_unavailable: 지금은 처리할 수 없습니다 · service_paused: 서비스가 잠시 멈춰 있습니다",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/ErrorEnvelope"
      }
     }
    }
   }
  }
 }
}
