Duplicate resource after retrying POST with Idempotency-Key on DigitalOcean API
0 reputation · 18 Jul 2023, 08:20 UTC
Goal
Confirm whether a DigitalOcean API POST request retried with the same Idempotency-Key returns the originally created resource instead of a duplicate, and identify which endpoints honor the header.
Constraints and uncertainty
DigitalOcean documents Idempotency-Key support for eligible POST requests, but does not publish a uniform key retention period or an exhaustive endpoint list. Reusing a key with a modified request body may produce endpoint-specific behavior rather than guaranteed deduplication. A timeout before the response arrives also leaves write execution uncertain.
Which DigitalOcean API endpoints currently honor Idempotency-Key? What is the documented retention period for an idempotency key before it expires or can be reused? How does the API respond when the same key is sent with a different request body?