| draft-ietf-httpapi-idempotency-key-header-07.unpg.txt | draft-ietf-httpapi-idempotency-key-header-latest.txt | |||
|---|---|---|---|---|
| Network Working Group J. Jena | Network Working Group J. Jena | |||
| Internet-Draft | Internet-Draft | |||
| Intended status: Standards Track S. Dalal | Intended status: Standards Track S. Dalal | |||
| Expires: April 18, 2026 October 15, 2025 | Expires: May 10, 2026 November 06, 2025 | |||
| The Idempotency-Key HTTP Header Field | The Idempotency-Key HTTP Header Field | |||
| draft-ietf-httpapi-idempotency-key-header-07 | draft-ietf-httpapi-idempotency-key-header-latest | |||
| Abstract | Abstract | |||
| The HTTP Idempotency-Key request header field can be used to make | The HTTP Idempotency-Key request header field can be used to make | |||
| non-idempotent HTTP methods such as "POST" or "PATCH" fault-tolerant. | non-idempotent HTTP methods such as "POST" or "PATCH" fault-tolerant. | |||
| About This Document | About This Document | |||
| This note is to be removed before publishing as an RFC. | This note is to be removed before publishing as an RFC. | |||
| skipping to change at line 47 ¶ | skipping to change at page 1, line 48 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on April 18, 2026. | This Internet-Draft will expire on May 10, 2026. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2025 IETF Trust and the persons identified as the | Copyright (c) 2025 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
| to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
| include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 1.1. Notational Conventions | 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 | |||
| 2. The Idempotency-Key HTTP Request Header Field | 2. The Idempotency-Key HTTP Request Header Field . . . . . . . . 3 | |||
| 2.1. Syntax | 2.1. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
| 2.2. Uniqueness of Idempotency Key | 2.2. Uniqueness of Idempotency Key . . . . . . . . . . . . . . 3 | |||
| 2.3. Idempotency Key Validity and Expiry | 2.3. Idempotency Key Validity and Expiry . . . . . . . . . . . 4 | |||
| 2.4. Idempotency Fingerprint | 2.4. Idempotency Fingerprint . . . . . . . . . . . . . . . . . 4 | |||
| 2.5. Responsibilities | 2.5. Responsibilities . . . . . . . . . . . . . . . . . . . . 4 | |||
| 2.5.1. Client | 2.5.1. Client . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 2.5.2. Resource | 2.5.2. Resource . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 2.6. Idempotency Enforcement | 2.6. Idempotency Enforcement . . . . . . . . . . . . . . . . . 5 | |||
| 2.7. Error Handling | 2.7. Error Handling . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 3. IANA Considerations | 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 3.1. The Idempotency-Key HTTP Request Header Field | 3.1. The Idempotency-Key HTTP Request Header Field . . . . . . 7 | |||
| 4. Implementation Status | 4. Implementation Status . . . . . . . . . . . . . . . . . . . . 7 | |||
| 4.1. Implementing the Concept | 4.1. Implementing the Concept . . . . . . . . . . . . . . . . 9 | |||
| 5. Security Considerations | 5. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | |||
| 6. Examples | 6. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
| 7. References | 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
| 7.1. Normative References | 7.1. Normative References . . . . . . . . . . . . . . . . . . 12 | |||
| 7.2. Informative References | 7.2. Informative References . . . . . . . . . . . . . . . . . 13 | |||
| Appendix A. Changes from Draft-06 | Appendix A. Changes from Draft-05 . . . . . . . . . . . . . . . 13 | |||
| Acknowledgments | Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| Authors' Addresses | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 | |||
| 1. Introduction | 1. Introduction | |||
| In mathematics and computer science, an idempotent operation is one | In mathematics and computer science, an idempotent operation is one | |||
| that can be applied multiple times without changing the result beyond | that can be applied multiple times without changing the result beyond | |||
| the initial application. It does not matter if the operation is | the initial application. It does not matter if the operation is | |||
| called only once or tens of times over. | called only once or tens of times over. | |||
| Idempotency is important in building fault-tolerant HTTP APIs. An | Idempotency is important in building fault-tolerant HTTP APIs. An | |||
| HTTP request method is considered "idempotent" if the intended effect | HTTP request method is considered "idempotent" if the intended effect | |||
| skipping to change at line 608 ¶ | skipping to change at page 13, line 34 ¶ | |||
| 7.3. URIs | 7.3. URIs | |||
| [1] https://github.com/paypal/api-standards/blob/master/ | [1] https://github.com/paypal/api-standards/blob/master/ | |||
| patterns.md#idempotency | patterns.md#idempotency | |||
| [2] https://stripe.com/docs/idempotency | [2] https://stripe.com/docs/idempotency | |||
| [3] https://tools.ietf.org/html/draft-nottingham-http-poe-00 | [3] https://tools.ietf.org/html/draft-nottingham-http-poe-00 | |||
| Appendix A. Changes from Draft-06 | Appendix A. Changes from Draft-05 | |||
| This revision has made the following changes: * Added change log | ||||
| starting from previous draft * Correction in introduction * Added an | ||||
| implementer | ||||
| Acknowledgments | Acknowledgments | |||
| The authors would like to thank Mark Nottingham for his support for | The authors would like to thank Mark Nottingham for his support for | |||
| this Internet Draft. We would like to acknowledge that this draft is | this Internet Draft. We would like to acknowledge that this draft is | |||
| inspired by Idempotency related patterns described in API | inspired by Idempotency related patterns described in API | |||
| documentation of PayPal [1] and Stripe [2] as well as Internet Draft | documentation of PayPal [1] and Stripe [2] as well as Internet Draft | |||
| on POST Once Exactly [3] authored by Mark Nottingham. | on POST Once Exactly [3] authored by Mark Nottingham. | |||
| The authors take all responsibility for errors and omissions. | The authors take all responsibility for errors and omissions. | |||
| End of changes. 5 change blocks. | ||||
| 28 lines changed or deleted | 32 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||