{
  "openapi": "3.1.0",
  "info": {
    "title": "SAMLab upls_db",
    "version": "0.4.0",
    "description": "ICAMA 实时查询与 UPLS 只读预览查询，使用不同的 Bearer Token。UPLS 默认待连接，业务返回 UNAVAILABLE。ICAMA 异步任务完成后内存保留 600 秒。调用方按可信代理解析后的出口 IP 区分。同步请求 5 秒队列等待 + 20 秒执行；批量 60 秒队列等待 + 240 秒执行。A1 来源侧可选持久化本地快照和冻结候选，独立只读凭据；默认清单为空、定时关闭。"
  },
  "servers": [
    {
      "url": "https://mcp.samlab.cn"
    }
  ],
  "paths": {
    "/api/upls_db": {
      "get": {
        "summary": "getUplsConcept",
        "operationId": "getUplsConcept",
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
              "maxLength": 128
            },
            "description": "本次调用方范围内的幂等请求 ID"
          },
          {
            "name": "X-Trace-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
              "maxLength": 128
            },
            "description": "当前调用的独立追踪 ID"
          },
          {
            "name": "X-Priority",
            "in": "header",
            "schema": {
              "type": "string",
              "enum": [
                "normal"
              ]
            }
          },
          {
            "name": "acui",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "已处理；查询结果须继续检查 data.status",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "本次调用方范围内的幂等请求 ID"
              },
              "X-Trace-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "当前调用的独立追踪 ID"
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConceptResult"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                      "maxLength": 128
                    },
                    "traceId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                      "maxLength": 128
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "replayed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "requestId",
                    "traceId",
                    "timestamp",
                    "replayed"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "服务层错误，查看 error.code；429/503 按 Retry-After 退避",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "本次调用方范围内的幂等请求 ID"
              },
              "X-Trace-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "当前调用的独立追踪 ID"
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "服务层错误，查看 error.code；429/503 按 Retry-After 退避",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "本次调用方范围内的幂等请求 ID"
              },
              "X-Trace-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "当前调用的独立追踪 ID"
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "服务层错误，查看 error.code；429/503 按 Retry-After 退避",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "本次调用方范围内的幂等请求 ID"
              },
              "X-Trace-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "当前调用的独立追踪 ID"
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "服务层错误，查看 error.code；429/503 按 Retry-After 退避",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "本次调用方范围内的幂等请求 ID"
              },
              "X-Trace-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "当前调用的独立追踪 ID"
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "服务层错误，查看 error.code；429/503 按 Retry-After 退避",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "本次调用方范围内的幂等请求 ID"
              },
              "X-Trace-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "当前调用的独立追踪 ID"
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "服务层错误，查看 error.code；429/503 按 Retry-After 退避",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "本次调用方范围内的幂等请求 ID"
              },
              "X-Trace-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "当前调用的独立追踪 ID"
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "服务层错误，查看 error.code；429/503 按 Retry-After 退避",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "本次调用方范围内的幂等请求 ID"
              },
              "X-Trace-ID": {
                "schema": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                  "maxLength": 128
                },
                "description": "当前调用的独立追踪 ID"
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "tags": [
          "upls_db"
        ],
        "security": [
          {
            "UplsToken": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "const": false
          },
          "requestId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
            "maxLength": 128
          },
          "traceId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
            "maxLength": 128
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "INVALID_PARAMETER",
                  "CONFLICT",
                  "NOT_FOUND",
                  "RATE_LIMITED",
                  "SERVICE_UNAVAILABLE",
                  "INVALID_CREDENTIALS",
                  "UNSUPPORTED_MEDIA_TYPE",
                  "PAYLOAD_TOO_LARGE",
                  "INTERNAL_ERROR",
                  "CURSOR_EXPIRED"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "message",
              "details"
            ]
          }
        },
        "required": [
          "success",
          "requestId",
          "traceId",
          "timestamp",
          "error"
        ]
      },
      "Concept": {
        "additionalProperties": false,
        "properties": {
          "acui": {
            "title": "Acui",
            "type": "string"
          },
          "preferred_zh": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Zh"
          },
          "preferred_en": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred En"
          }
        },
        "required": [
          "acui",
          "preferred_zh",
          "preferred_en"
        ],
        "title": "Concept",
        "type": "object"
      },
      "ConceptResult": {
        "additionalProperties": false,
        "properties": {
          "status": {
            "enum": [
              "FOUND",
              "NOT_FOUND",
              "UNAVAILABLE"
            ],
            "title": "Status",
            "type": "string"
          },
          "data_scope": {
            "const": "PRE_RELEASE_PREVIEW",
            "default": "PRE_RELEASE_PREVIEW",
            "title": "Data Scope",
            "type": "string"
          },
          "release_id": {
            "default": null,
            "title": "Release Id",
            "type": "null"
          },
          "concept": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Concept"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "required": [
          "status"
        ],
        "title": "ConceptResult",
        "type": "object"
      }
    },
    "securitySchemes": {
      "UplsToken": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
