開発者向けドキュメントGet started
Idempotency
Retry POST /v1/pack without creating a second job.
Send an Idempotency-Key with POST /v1/pack (or POST /v1/projects/{id}/pack). Retry with the same key and you get the same job, charged once.
curl -X POST https://runner.cargoduo.com/v1/pack \
-H "Authorization: Bearer $CARGODUO_API_KEY" \
-H "Idempotency-Key: order-1042-v1" \
-H "Content-Type: application/json" \
-d @request.json| Rule | Detail |
|---|---|
| Window | 24 hours, per organization |
| Key | Any string up to 128 characters: a UUID or your order id |
| Replay | The original job, with Idempotent-Replayed: true. 200 once it ended, 202 before |
| Too long | 400 idempotency_key_invalid |
One key per logical request. A changed body needs a new key.