Idempotent Requests
The MagFi API supports the use of Idempotency-Key for all authenticated POST and PATCH requests, following the established draft RFC.
GET and DELETE requests are inherently idempotent.
To make an idempotent request:
- Generate a random key for your request. A UUID is a good choice.
- Attach the
Idempotency-KeyHTTP header with your random key as the value. - Make your request normally.
Making use of idempotent requests is currently optional, but highly recommended.
Idempotency keys expire after 24 hours in all environments.
See draft-ietf-httpapi-idempotency-key-header-06 for more details on idempotent requests.