Skip to Content

Idempotency

Retry create requests safely with the Idempotency-Key header.

Five operations accept an Idempotency-Key header, so a retry after a timeout does not create a second copy:

The key is any string of 1 to 255 visible ASCII characters, such as a UUID you generate per attempt. Keys are kept per API key.

POST /v1/clusters/{cluster_id}/apps/{app_id}/deploys
Authorization: Bearer $ALC_API_KEY
Idempotency-Key: 9f3c6c2e-2d4b-4b7e-a1f0-6e5d8c7b9a10
Content-Type: application/json

{ "strategy": "rolling" }

How a retry is answered

The retryThe answer
Same key and body, within 24 hoursThe first response again, with Idempotent-Replayed: true.
Same key, different body422.
Same key while the first request still runs409. Wait and retry.
Same key after the first request failedRuns again: a failed request does not keep its key.

Requests without the header run normally.

On this page