跳转到主要内容
监控与采集相关接口/自动修复
POSTMonitoring起始版本 1.0同步需要认证

触发修复

立即触发修复策略执行特定代理。

调试可用性

在线调试

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

路径参数

请求参数

路径参数

  • policyIdString必填

    策略ID。

请求体字段

  • agentIdString必填

    代理ID。

    示例: agent-001-xyz

响应状态

200 OK

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

  • idString

    资源ID。

    示例: exec-001-abc

  • policyIdString

    策略ID。

    示例: policy-001-abc

  • agentIdString

    代理ID。

    示例: agent-001-xyz

  • triggeredAtString

    已触发时间。

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

  • actionString

    动作名称。

    示例: restart_service

  • statusString

    状态信息。

    示例: succeeded

  • verifiedAtString

    已验证时间。

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

  • errorString

    错误码。操作成功时为 null,失败时返回具体错误信息。

    示例: connection refused

  • retryCountInteger

    重试数量。

    示例: 20

请求地址

POST/api/v1/monitoring/remediation-policies/{policyId}/trigger

/api/v1/monitoring/remediation-policies/{policyId}/trigger

操作 ID

TriggerRemediation

永久链接

请求示例

curl -X POST '{host}/api/v1/monitoring/remediation-policies/{policyId}/trigger' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"agentId":"agent-001-xyz"}'

响应示例

200
{
  "id": "exec-001-abc",
  "policyId": "policy-001-abc",
  "agentId": "agent-001-xyz",
  "triggeredAt": "example",
  "action": "restart_service",
  "status": "succeeded",
  "verifiedAt": "example",
  "error": "connection refused"
}

变更历史

此 API 暂无变更历史记录。

查看全部变更历史