Menu
Idempotency
How a retry after a lost answer is made safe, for every operation that spends credits.
When an answer is lost (a dropped connection, a timeout), retrying must not create or charge something twice. Every operation that spends credits says how a retry is made safe, in x-weird-idempotency:
header: send theIdempotency-Keyheader, 1 to 255 printable ASCII characters naming this operation. Repeating the request with the same key, on the same route and within 24 hours, answers the first answer again with the headeridempotent-replay: true; it is not performed or charged a second time. A malformed key, or one used for a different request, is refused 400invalid-params.body: a field of the body (named infield, required or not) does the same.natural: a repeat is refused or changes nothing, for the reason given.none: a repeat makes a second one;billssays whether it costs.
Make the key once per intended action and reuse it on every retry of that action. The weird command line does this for you, and --idempotency-key lets a script choose the key of a charged create.
| Operation | Retry safety |
|---|---|
POST /abuse/reports | a repeat makes a second one (it costs nothing): a repeat files a second report with its own reference (nothing is charged); keep the first reference rather than sending again |
POST /auth/account/export | a repeat is refused or changes nothing: one copy a day: a repeat within a day answers the copy already asked for (200), or 429 rate-limited once it is gone |
POST /credits/withdrawals | a repeat is refused or changes nothing: a top-up is withdrawn from once: a repeat answers the withdrawal already made (200) and refunds nothing twice |
GET /dns/events | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /dns/zones | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /dns/zones | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /dns/zones/{origin} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
DELETE /dns/zones/{origin} | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /dns/zones/{origin}/dnssec | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /dns/zones/{origin}/export | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
PUT /dns/zones/{origin}/import | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /dns/zones/{origin}/migration | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /dns/zones/{origin}/records | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
DELETE /dns/zones/{origin}/records/{name} | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
POST /dns/zones/{origin}/resync | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /dns/zones/{origin}/resync | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /dns/zones/{origin}/resync/apply | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
POST /dns/zones/{origin}/seed | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
POST /dns/zones/{origin}/snapshots | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /dns/zones/{origin}/snapshots | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /dns/zones/{origin}/snapshots/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /domains | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /domains | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /domains/availability | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /domains/{domain} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /domains/{domain}/grants | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /domains/{domain}/hosting | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
POST /domains/{domain}/renew | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /domains/{domain}/trade | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /domains/{domain}/trade | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
POST /domains/{domain}/transfer | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /ipfs/cid/{cid} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/content | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/content/{cid} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/content/{cid}/copies | a repeat is refused or changes nothing: the same copy count as now changes nothing (state unchanged, or raising/lowering while the first change is under way) |
GET /ipfs/domains | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/domains | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
DELETE /ipfs/domains/{id} | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /ipfs/domains/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/domains/{id}/pins | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/domains/{id}/pins | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/domains/{id}/retarget | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
POST /ipfs/domains/{id}/stats/detail | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /ipfs/grants | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/grants | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/names | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/names | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/names/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
PUT /ipfs/names/{id}/target | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/path-maps | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/path-maps | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/path-maps/{id}/desired | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/pins | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/pins | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/pins/{requestid} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/stats/detail | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/stats/export | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/stats/paths | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/stats/settings | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/stats/subjects | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/stats/summary | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/stats/today | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/storage/enable | a repeat is refused or changes nothing: storage is enabled once per account: a repeat answers the same state with charged false and charges nothing |
GET /ipfs/storage/location-notice | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /ipfs/uploads | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /ipfs/uploads | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/uploads/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /ipfs/usage | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /names | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /names | send the Idempotency-Key header: a repeat with the same key answers the first answer and is not performed or charged again |
GET /names/bases | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /names/check | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /names/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /p2p/apps | a repeat is refused or changes nothing: an app name is unique: a repeat is refused 409 conflict (the name is taken) |
GET /p2p/apps | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /p2p/apps/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /p2p/apps/{id}/domains | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /tunnels | a repeat is refused or changes nothing: a hostname has at most one live tunnel: a repeat is refused 409 hostname-taken |
GET /tunnels | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /tunnels/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/actions/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/activity | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/apps | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/apps/deployments | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /vps/apps/deployments | the body field idempotency_key (required) makes a repeat safe |
GET /vps/apps/deployments/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/availability | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/charges | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/instances | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /vps/instances | the body field idempotency_key (required) makes a repeat safe |
GET /vps/instances/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/instances/{id}/actions | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/instances/{id}/domains | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/instances/{id}/metrics | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /vps/instances/{id}/resize | a repeat is refused or changes nothing: a repeat is refused: 409 busy while the first resize runs, then 400 invalid-params (field tier_id: the instance is of this tier already) |
POST /vps/instances/{id}/snapshots | the body field idempotency_key (required) makes a repeat safe |
GET /vps/limits | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/snapshots | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/ssh-keys | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/ssh-keys/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/system-images | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/tiers | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/transfers | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
GET /vps/volumes | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /vps/volumes | the body field idempotency_key (required) makes a repeat safe |
GET /vps/volumes/{id} | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
POST /vps/volumes/{id}/resize | a repeat is refused or changes nothing: a repeat is refused: 409 busy while the first growth runs, then 400 invalid-params (field size_gb: a volume only grows) |