跳到主要内容

模板同步

将模板同步到指定节点。

请求

POST /api/v1/pve/template/:id/sync
Authorization: Bearer <token>
Content-Type: application/json

路径参数

参数类型说明
idint模板 ID

请求体

{
"targetNodes": ["pve-node-02", "pve-node-03"],
"mode": "full"
}

请求参数说明

参数类型说明
targetNodesarray目标节点列表
modestring同步模式(full/incremental)

响应

{
"code": 200,
"message": "success",
"data": {
"taskId": "template-sync-12345"
}
}

同步状态

可以通过任务 API 查询同步状态:

GET /api/v1/pve/task/:taskId
Authorization: Bearer <token>