You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| resource‑collection | Name of the collection, unabbreviated, pluralized
70
70
| resource‑id | Value of the unique id property. This MUST be the raw string/number/guid value with no quoting but properly escaped to fit in a URL segment.
@@ -81,7 +81,7 @@ Some customer-provided path segment values may be compared case-insensitivity if
81
81
82
82
:white_check_mark:**DO** restrict the characters in service-defined path segments to `0-9 A-Z a-z - . _ ~`, with `:` allowed only as described below to designate an action operation.
83
83
84
-
:ballot_box_with_check:**YOU SHOULD** restrict the characters allowed in user-specified path segements (i.e. path parameters values) to `0-9 A-Z a-z - . _ ~` (do not allow `:`).
84
+
:ballot_box_with_check:**YOU SHOULD** restrict the characters allowed in user-specified path segments (i.e. path parameters values) to `0-9 A-Z a-z - . _ ~` (do not allow `:`).
85
85
86
86
:ballot_box_with_check:**YOU SHOULD** keep URLs readable; if possible, avoid UUIDs & %-encoding (ex: Cádiz is %-encoded as C%C3%A1diz)
87
87
@@ -170,9 +170,9 @@ The table below lists the headers most used by Azure services:
170
170
Header Key | Applies to | Example
171
171
------------------- | ---------- | -------------
172
172
_authorization_ | Request | Bearer eyJ0...Xd6j (Support Azure Active Directory)
173
-
_x-ms-useragent_ | Request | (see [Distributed Tracing & Telemetry](#Distributed-Tracing-&-Telemetry))
174
-
traceparent | Request | (see [Distributed Tracing & Telemetry](#Distributed-Tracing-&-Telemetry))
175
-
tracecontext | Request | (see [Distributed Tracing & Telemetry](#Distributed-Tracing-&-Telemetry))
173
+
_x-ms-useragent_ | Request | (see [Distributed Tracing & Telemetry](#Distributed-Tracing--Telemetry))
174
+
traceparent | Request | (see [Distributed Tracing & Telemetry](#Distributed-Tracing--Telemetry))
175
+
tracecontext | Request | (see [Distributed Tracing & Telemetry](#Distributed-Tracing--Telemetry))
176
176
accept | Request | application/json
177
177
If-Match | Request | "67ab43" or * (no quotes) (see [Conditional Requests](#Conditional-Requests))
178
178
If-None-Match | Request | "67ab43" or * (no quotes) (see [Conditional Requests](#Conditional-Requests))
@@ -181,7 +181,7 @@ If-Unmodified-Since | Request | Sun, 06 Nov 1994 08:49:37 GMT (see [Condition
181
181
date | Both | Sun, 06 Nov 1994 08:49:37 GMT (see [RFC7231, Section 7.1.1.2](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.2))
182
182
_content-type_ | Both | application/merge-patch+json
Note: RFC 1123 defines the date format as a modification of the date format in [RFC 822, Section 5](https://datatracker.ietf.org/doc/html/rfc822#section-5) to support either a 2 or 4 digit year, and further recommends that a 4 digit year always be used.
201
201
202
+
:white_check_mark:**DO** create an opaque value that uniquely identifies the request and return this value in the `x-ms-request-id` response header.
203
+
204
+
Your service should include the `x-ms-request-id` value in error logs so that users can submit support requests for specific failures using this value.
205
+
202
206
:no_entry:**DO NOT** fail a request that contains an unrecognized header. Headers may be added by API gateways or middleware and this must be tolerated
203
207
204
208
:no_entry:**DO NOT** use "x-" prefix for custom headers, unless the header already exists in production [[RFC 6648](https://datatracker.ietf.org/doc/html/rfc6648)].
@@ -674,7 +678,7 @@ Azure services need to change over time. However, when changing a service, there
674
678
675
679
:white_check_mark:**DO** review any API changes with the Azure API Stewardship Board
676
680
677
-
:white_check_mark:**DO** use an `api-version` query parameter with a date value
681
+
:white_check_mark:**DO** use an `api-version` query parameter with a `YYYY-MM-DD`date value, with a `-preview` suffix for a preview service.
678
682
679
683
```http
680
684
PUT https://service.azure.com/users/Jeff?api-version=2021-06-04
@@ -806,7 +810,7 @@ Some common situations where the RELO pattern should be used:
806
810
807
811
:white_check_mark:**DO** support a get method on the resource that returns a representation of the resource including the status field that indicates when the operation has completed.
808
812
809
-
:white_check_mark:**DO** define the "status" field of the resource as an enum with all the values it may contain including the "terminal" values "Succeeded", "Failed", and "Canceled".
813
+
:white_check_mark:**DO** define the "status" field of the resource as an enum with all the values it may contain including the "terminal" values "Succeeded", "Failed", and "Canceled". See [Enums & SDKs](#enums--sdks-client-libraries).
810
814
811
815
:ballot_box_with_check:**YOU SHOULD** use the name `status` for the "status" field of the resource.
812
816
@@ -963,8 +967,8 @@ When supporting optimistic concurrency:
963
967
| PATCH / PUT |`If-None-Match`| * | check for _any_ version of the resource, if one is found, fail the operation |`412-Precondition Failed`| Response body SHOULD return the serialized value of the resource (typically JSON) that was passed along with the request.|
964
968
| PATCH / PUT |`If-Match`| value of ETag | value of `If-Match` equals the latest ETag value on the server, confirming that the version of the resource is the most current |`200-OK` or </br> `201-Created` </br> | Response header MUST include the new `ETag` value. Response body SHOULD include the serialized value of the resource (typically JSON). |
965
969
| PATCH / PUT |`If-Match`| value of ETag | value of `If-Match` header DOES NOT equal the latest ETag value on the server, indicating a change has ocurred since after the client fetched the resource|`412-Precondition Failed`| Response body SHOULD return the serialized value of the resource (typically JSON) that was passed along with the request.|
966
-
| DELETE |`If-None-Match`| value of ETag | value does NOT match the latest value on the server |`412-Preconditioned Failed`| Response body SHOULD be empty.|
967
-
| DELETE |`If-None-Match`| value of ETag | value matches the latest value on the server |`204-No Content`| Response body SHOULD be empty.|
970
+
| DELETE |`If-Match`| value of ETag | value matches the latest value on the server |`204-No Content`| Response body SHOULD be empty.|
971
+
| DELETE |`If-Match`| value of ETag | value does NOT match the latest value on the server |`412-Preconditioned Failed`| Response body SHOULD be empty.|
968
972
969
973
#### Computing ETags
970
974
The strategy that you use to compute the `ETag` depends on its semantic. For example, it is natural, for resources that are inherently versioned, to use the version as the value of the `ETag`. Another common strategy for determining the value of an `ETag` is to use a hash of the resource. If a resource is not versioned, and unless computing a hash is prohibitively expensive, this is the preferred mechanism.
0 commit comments