[openstreetmap/openstreetmap-website] Idempotency for API 0.6 (#2201)
mmd
notifications at github.com
Sat Apr 6 08:15:51 UTC 2019
API 0.6 has no concept to prevent duplicate POST operations, which could happen as a client retries a failed network operation. As per RFC 7231, POST operations are not idempotent, which is quite unfortunate in particular for diff uploads: assuming the changeset consists of "create" operations only, those **objects might be created multiple times** on the database.
I've created this issue to discuss different options (such as adding a downward-compatible HTTP Header "Idempotency-Key"), and find ways on how to implement it in the API.
Some pointers:
[Link](https://opensource.zalando.com/restful-api-guidelines/#229) proposes as part of their RESTful API guidlines:
* Should: Consider To Design POST and PATCH Idempotent [229]:
_A client specific idempotency key provided via Idempotency-Key header in the request. The key is not part of the resource but stored temporarily pointing to the original response to ensure idempotent behavior when retrying a request (see May: Consider to Support Idempotency-Key Header)._
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2201
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190406/fd01a1e9/attachment.html>
More information about the rails-dev
mailing list