Skip to content

Commit 83568c5

Browse files
JeffreyRichtermikekistler
authored andcommitted
Update Repeatability headers section
1 parent e18b48c commit 83568c5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

azure/Guidelines.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Please ensure that you add an anchor tag to any new guidelines that you add and
1717
| Date | Notes |
1818
| ----------- | -------------------------------------------------------------- |
1919
| 2023-May-12 | Explain service response for missing/unsupported `api-version` |
20+
| 2023-Apr-21 | Update/clarify guidelines on POST method repeatability |
2021
| 2023-Apr-07 | Update/clarify guidelines on polymorphism |
2122
| 2022-Sep-07 | Updated URL guidelines for DNS Done Right |
2223
| 2022-Jul-15 | Update guidance on long-running operations |
@@ -836,13 +837,13 @@ For example:
836837
<a href="#repeatability" name="repeatability"></a>
837838
### Repeatability of requests
838839

839-
The ability to retry failed requests for which a client never received a response greatly simplifies the ability to write resilient distributed applications. While HTTP designates some methods as safe and/or idempotent (and thus retryable), being able to retry other operations such as create-using-POST-to-collection is desirable.
840-
841-
<a href="#repeatability-headers" name="repeatability-headers">:ballot_box_with_check:</a> **YOU SHOULD** support repeatable requests according as defined in [OASIS Repeatable Requests Version 1.0](https://docs.oasis-open.org/odata/repeatable-requests/v1.0/repeatable-requests-v1.0.html).
840+
Fault tolerant applications require that clients retry requests for which they never got a response, and services must handle these retried requests idempotently. In Azure, all HTTP operations are naturally idempotent except for POST used to create a resource and [POST when used to invoke an action](
841+
https://github.com/microsoft/api-guidelines/blob/d81151d990b437b34dcf7d05d9504b754eb4f456/azure/Guidelines.md#performing-an-action).
842842

843+
<a href="#repeatability-headers" name="repeatability-headers">:ballot_box_with_check:</a> **YOU SHOULD** support repeatable requests as defined in [OASIS Repeatable Requests Version 1.0](https://docs.oasis-open.org/odata/repeatable-requests/v1.0/repeatable-requests-v1.0.html) for POST operations to make them retriable.
843844
- The tracked time window (difference between the `Repeatability-First-Sent` value and the current time) **MUST** be at least 5 minutes.
844-
- A service advertises support for repeatability requests by adding the `Repeatability-First-Sent` and `Repeatability-Request-ID` to the set of headers for a given operation.
845-
- When understood, all endpoints co-located behind a DNS name **MUST** understand the header. This means that a service **MUST NOT** ignore the presence of a header for any endpoints behind the DNS name, but rather fail the request containing a `Repeatability-Request-ID` header if that particular endpoint lacks support for repeatable requests. Such partial support **SHOULD** be avoided due to the confusion it causes for clients.
845+
- Document the POST operation's support for the `Repeatability-First-Sent`, `Repeatability-Request-ID`, and `Repeatability-Result` headers in the API contract and documentation.
846+
- Any operation that does not support repeatability headers should return a 501 (Not Implemented) response for any request that contains valid repeatability request headers.
846847

847848
<a href="#lro" name="lro"></a>
848849
### Long-Running Operations & Jobs

0 commit comments

Comments
 (0)