openapi: 3.1.0 info: title: RCU Upgrade Service Spec version: 1.0.0 description: Specification for RCU Upgrade Service API interactions and data models. paths: /api/Upgrade_V2: post: summary: Trigger Upgrade operationId: triggerUpgrade requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/UpgradeRequest' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/UpgradeResponse' /api/QueryUpdateHostProgressBar: post: summary: Query Upgrade Status operationId: queryUpgradeStatus requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/QueryRequest' responses: '200': description: Status response content: application/json: schema: $ref: '#/components/schemas/QueryResponse' components: schemas: UpgradeRequest: type: object properties: roomtype_id: type: integer description: Room Type ID host_list_str: type: string description: JSON string array of Host IDs (e.g., "[1,2,3]") fileName: type: string description: Firmware filename required: - roomtype_id - host_list_str - fileName UpgradeResponse: type: object properties: IsSuccess: type: boolean Message: type: string required: - IsSuccess QueryRequest: type: object properties: HostIDList: type: string description: JSON string array of Host IDs (e.g., "[1,2,3]") required: - HostIDList QueryResponse: type: object properties: IsSuccess: type: boolean Response: type: array items: $ref: '#/components/schemas/HostStatus' required: - IsSuccess HostStatus: type: object properties: HostID: type: integer Upgrade_status: type: string enum: - 升级就绪 - 升级完成 - 升级失败 - 开始下载 - 下载中 - 下载完成 - 校验中 - 校验完成 - RCU升级中 - 超时失败 Upgrade_DateTime: type: string format: date-time UpgradeFileType: type: string enum: - 固件升级 - 配置升级 FileBlockTotalCount: type: integer FileCurrentNumber: type: integer BaiFenBi: type: string FileName: type: string Version: type: string ConfiguraVersion: type: string UpgradeLog: type: object description: Schema for database log entry properties: start_time: type: string format: date-time roomtype_id: type: integer host_str: type: string filename: type: string status: type: string end_time: type: string format: date-time file_type: type: string config_version: type: string firmware_version: type: string uuid: type: string format: uuid UpgradeConfigGroup: type: object properties: hosts: type: array items: type: integer roomtypes: type: array minItems: 2 maxItems: 2 items: $ref: '#/components/schemas/UpgradeConfigRoomtype' required: - hosts - roomtypes UpgradeConfigRoomtype: type: object properties: roomtype_id: type: integer fileName: type: string required: - roomtype_id - fileName