mnapis

删除任务包 / 取消作业

幂等。已导入卡片不受影响。对 preparing 即取消(cancelledJob 非 null 为真取消)。刚 discard 立刻重 prepare 易 429(等取消检查点)。同步 prepare 被并发 discard 则 409 PREPARE_CANCELLED。500 DISCARD_FAILED 为目录删不掉(残留按 details.bundleId 手工清)。

POST
/bundles/{id}/discard

幂等。已导入卡片不受影响。对 preparing 即取消(cancelledJob 非 null 为真取消)。刚 discard 立刻重 prepare 易 429(等取消检查点)。同步 prepare 被并发 discard 则 409 PREPARE_CANCELLED。500 DISCARD_FAILED 为目录删不掉(残留按 details.bundleId 手工清)。

Authorization

bearerAuth
AuthorizationBearer <token>

安装脚本写入 ~/.config/mn-bridge/token,或环境变量 MN_BRIDGE_TOKEN。不要带 Origin 头。

In: header

Path Parameters

id*string

任务包 bundleId

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

删包/取消作业(空 body 即可);幂等,已导入卡片不受影响。

Response Body

curl -X POST "https://example.com/bundles/string/discard" \  -H "Content-Type: application/json" \  -d '{}'
Empty