创建分析

OpenAPI 契约

方法
POST
路径
/api/v1/analyses
认证
jwtBearer (bearer)
响应状态
202 400 401 403 404 413 429 500
请求与响应 Schema
JSON
{
  "requestBody": {
    "multipart/form-data": {
      "properties": {
        "file": {
          "format": "binary",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "responses": {
    "202": {
      "description": "Analysis accepted",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/AnalysisResponse"
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RequestError"
        }
      }
    },
    "401": {
      "description": "Authentication required",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "403": {
      "description": "Not permitted",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "404": {
      "description": "Analysis or input not found",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "413": {
      "description": "Upload or expanded archive exceeds its limit",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "429": {
      "description": "Request or concurrency limit exceeded",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RateLimitError"
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

提交且仅提交一种输入来源:JAR 文件、可访问的 buildId,或允许读取原始输入的 analysisId。同时携带完整的当前模块配置,包括为多个问题准备的声明;复用分析输入不会隐式复用旧配置。可选的项目 ID 保留上下文。分析拥有独立于构建的生命周期,固定为 0 NCU,不冻结额度,仍受上传、并发任务及资源限制。保留提交时的草稿以供证据比较;输入或配置变化后,旧证据仍未验证当前配置。提交既不会启用对象局部化,也不会保存项目配置。