PDF 生成模板编辑器
开源可视化 PDF 生成引擎,支持自定义模板,并提供面向开发者的 API,灵活构建文档生成流程。
该接口用于取消仍处于 pending 或 processing 状态的异步文件处理任务。
| 项目 | 值 |
|---|---|
| 请求地址 | POST http://localhost:8080/api/v1/task/{id}/cancel |
| 身份认证 | x-api-key: your_api_key_here |
| Content type | application/json |
curl -X POST "http://localhost:8080/api/v1/task/7fdc1fb6-1f4d-4b5c-88d6-4b4c4c1e8f44/cancel" \
-H "x-api-key: your_api_key_here"{
"code": 200,
"msg": "success",
"data": {
"taskId": "7fdc1fb6-1f4d-4b5c-88d6-4b4c4c1e8f44",
"status": "canceled",
"failureCode": "TASK_CANCELED",
"failureReason": "task canceled by client"
}
}已经进入 success 或 failed 的任务会保留最终状态。