跳转到主要内容
基础设施相关接口/OTA 版本与策略
POSTOTA起始版本 1.0同步需要认证

运行预检

执行预检健康就绪检查启动中升级。

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

路径参数

请求参数

路径参数

  • planIdString必填

    计划ID。

请求体字段

  • agentIdsList必填

    代理ID列表。

    示例: item1,item2

  • configObject必填

    配置信息。

    • planIdString

      计划ID。

      示例: plan-a1b2c3d4-e5f6-7890-abcd-ef1234567890

    • modeString

      预检模式严格建议。

      示例: strict

    • checksList

      资源。

      示例: item1,item2

    • timeoutSecInteger

      超时时间秒。

      示例: 120

    • minHealthyPctLong

      最小健康比例。

      示例: 90

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • planIdString

    计划ID。

    示例: plan-a1b2c3d4-e5f6-7890-abcd-ef1234567890

  • modeString

    已使用预检运行。

    示例: strict

  • totalAgentsInteger

    代理总数。

    示例: 20

  • healthyAgentsInteger

    健康代理。

    示例: 19

  • unhealthyAgentsInteger

    不健康代理。

    示例: 1

  • healthyPctLong

    健康百分比。

    示例: 95

  • decisionString

    处理决定。

    示例: proceed

  • excludedAgentIdsList

    排除代理ID。

    示例: item1,item2

  • agentResultsList

    代理结果。

    示例: (nested array)

    • agentIdString

      代理ID。

      示例: lca-node01.example.com

    • agentNameString

      显示名称代理节点。

      示例: node01

    • healthyBoolean

      代理已通过预检检查。

      示例: true

    • checkResultsLinkedHashMap

      预检检查结果条目。

      示例: (nested object)

    • failReasonsList

      失败原因。

      示例: item1,item2

  • checkedAtString

    检查时间。

    示例: 2026-01-15T08:00:00Z

  • durationMsString

    时长预检运行时间,单位为毫秒。

    示例: 4800

请求地址

POST/api/v1/ota/plans/{planId}/preflight

/api/v1/ota/plans/{planId}/preflight

操作 ID

RunPreflight

永久链接

请求示例

curl -X POST '{host}/api/v1/ota/plans/{planId}/preflight' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"agentIds":"item1,item2","config":{"planId":"plan-a1b2c3d4-e5f6-7890-abcd-ef1234567890","mode":"strict","checks":"item1,item2","timeoutSec":120,"minHealthyPct":90.0}}'

响应示例

200
{"planId": "plan-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "mode": "strict", "totalAgents": 20, "healthyAgents": 19, "unhealthyAgents": 1, "healthyPct": 95.0, "decision": "proceed", "excludedAgentIds": ["value"]}

变更历史

此 API 暂无变更历史记录。

查看全部变更历史