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
Copy file name to clipboardExpand all lines: Guidelines.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,7 +287,7 @@ Under UPSERT semantics, a PATCH call to a nonexistent resource is handled by the
287
287
If a service does not support UPSERT, then a PATCH call against a resource that does not exist MUST result in an HTTP "409 Conflict" error.
288
288
289
289
#### 7.4.4 Options and link headers
290
-
OPTIONS allows a client to retrieve information about an resource, at a minimum by returning the Allow header denoting the valid method verbs for this resource.
290
+
OPTIONS allows a client to retrieve information about a resource, at a minimum by returning the Allow header denoting the valid method verbs for this resource.
291
291
292
292
In addition, services SHOULD include a Link header (see [RFC 5988][rfc-5988]) to point to documentation for the resource in question:
293
293
@@ -536,7 +536,7 @@ Because browser preflight response caches are notoriously weak, the additional r
536
536
- Services MUST NOT contravene other API recommendations in the name of avoiding CORS preflight requests. In particular, in accordance with recommendations, most POST requests will actually require a preflight request due to the Content-Type.
537
537
- If eliminating preflight is critical, then a service MAY support alternative mechanisms for data transfer, but the RECOMMENDED approach MUST also be supported.
538
538
539
-
In addition, when appropriate services MAY support the JSONP pattern for simple, GET-only cross-domain access. In JSONP services, take a parameter indicating the format (_$format=json_) and a parameter indicating a callback (_$callback=someFunc_) and return a text/javascript document containing the JSON response wrapped in a function call with the indicated name. More on JSONP at Wikipedia: [JSONP](https://en.wikipedia.org/wiki/JSONP).
539
+
In addition, when appropriate services MAY support the JSONP pattern for simple, GET-only cross-domain access. In JSONP, services take a parameter indicating the format (_$format=json_) and a parameter indicating a callback (_$callback=someFunc_), and return a text/javascript document containing the JSON response wrapped in a function call with the indicated name. More on JSONP at Wikipedia: [JSONP](https://en.wikipedia.org/wiki/JSONP).
540
540
541
541
## 9 Collections
542
542
### 9.1 Item keys
@@ -1491,7 +1491,7 @@ Non normative implementation guidance: In the final part of the sequence, when a
When subscriptions change either programmatically or in response to change via administrative UI portals, the subscribing service need to be protected from malicious or unexpected calls from services pushing potentially large volumes of notification traffic.
1494
+
When subscriptions change either programmatically or in response to change via administrative UI portals, the subscribing service needs to be protected from malicious or unexpected calls from services pushing potentially large volumes of notification traffic.
1495
1495
1496
1496
For all subscriptions, whether firehose or per-user, services MUST send a verification request as part of creation or modification via portal UI or API request, before sending any other notifications.
1497
1497
@@ -1510,7 +1510,7 @@ If any challenge request does not receive the prescribed response within 5 secon
1510
1510
Services MAY perform additional validations on URL ownership.
1511
1511
1512
1512
### 14.6 Receiving notifications
1513
-
Services SHOULD send notifications in response to service data change that do not include details of the changes themselves, but include enough information for the subscribing application to respond appropriately to the following process:
1513
+
Services SHOULD send notifications in response to service data changes that do not include details of the changes themselves, but include enough information for the subscribing application to respond appropriately to the following process:
1514
1514
1515
1515
1. Applications MUST identify the correct cached OAuth token to use for a callback
1516
1516
2. Applications MAY look up any previous delta token for the relevant scope of change
@@ -1585,14 +1585,14 @@ subscriptionId | The id of the subscription due to which this notification h
1585
1585
clientState | Services MUST provide the *clientState* field if it was provided at subscription creation time.
1586
1586
expirationDateTime | Services MUST provide the *expirationDateTime* field if the subscription has one.
1587
1587
resource | Services MUST provide the resource field. This URL MUST be considered opaque by the subscribing application. In the case of a richer notification it MAY be subsumed by message content that implicitly contains the resource URL to avoid duplication.<br/>If a service is providing this data as part of a more detailed data packet, then it need not be duplicated.
1588
-
userId | Services MUST provide this field or user-scoped resources. In the case of user-scoped resources, the unique identifier for the user should be used.<br/>In the case of resources shared between a specific set of users, multiple notifications must be sent, passing the unique identifier of each user.<br/>For tenant-scoped resources, the user id of the subscription should be used.
1588
+
userId | Services MUST provide this field for user-scoped resources. In the case of user-scoped resources, the unique identifier for the user should be used.<br/>In the case of resources shared between a specific set of users, multiple notifications must be sent, passing the unique identifier of each user.<br/>For tenant-scoped resources, the user id of the subscription should be used.
1589
1589
tenantId | Services that wish to support cross-tenant requests SHOULD provide this field. Services that provide notifications on tenant-scoped data MUST send this field.
1590
1590
1591
1591
### 14.7 Managing subscriptions programmatically
1592
1592
For per-user subscriptions, an API MUST be provided to create and manage subscriptions. The API must support at least the operations described here.
1593
1593
1594
1594
#### 14.7.1 Creating subscriptions
1595
-
A client creates a subscription by issuing a POST request against the subscription resource. The subscription namespace is client-defined via the POST operation.
1595
+
A client creates a subscription by issuing a POST request against the subscriptions resource. The subscription namespace is client-defined via the POST operation.
clientState | No | Opaque string passed back to the client on all notifications. Callers may choose to use this to provide tagging mechanisms.
1608
1608
1609
-
If the subscription was successfully created, the service MUST respond with the status code 201 CREATED and a body containing at least the following properties, in the same order as the request array, of the subscription:
1609
+
If the subscription was successfully created, the service MUST respond with the status code 201 CREATED and a body containing at least the following properties:
@@ -1615,7 +1615,7 @@ expirationDateTime | No | Uses existing Microsoft REST API Guidelines defi
1615
1615
1616
1616
Creation of subscriptions SHOULD be idempotent. The combination of properties scoped to the auth token, provides a uniqueness constraint.
1617
1617
1618
-
Below is an example request using a User + Application principal to subscribe to notifications from a file. In this example, the user specified "file1" as the context they wanted passed on all notifications:
1618
+
Below is an example request using a User + Application principal to subscribe to notifications from a file:
1619
1619
1620
1620
```http
1621
1621
POST https://api.contoso.com/files/v1.0/$subscriptions HTTP 1.1
@@ -1637,7 +1637,7 @@ The service SHOULD respond to such a message with a response format minimally li
1637
1637
}
1638
1638
```
1639
1639
1640
-
Below is an example using an Application-Only principal where the application is watching all files to which it's authorized. When created the user specified "allFiles" as the context to be passed on all notifications.
1640
+
Below is an example using an Application-Only principal where the application is watching all files to which it's authorized:
1641
1641
1642
1642
```http
1643
1643
POST https://api.contoso.com/files/v1.0/$subscriptions HTTP 1.1
As with update, the service MUST return 204 NO RESPONSE for a successful delete, and an error status code and body object to indicate failure.
1694
+
As with update, the service MUST return `204 No Content` for a successful delete, or an error body and status code to indicate failure.
1695
1695
1696
1696
#### 14.7.4 Enumerating subscriptions
1697
-
To get a list of active subscriptions, clients issue a GET request against the subscriptions entity set using a User + Application or Application-Only bearer token:
1697
+
To get a list of active subscriptions, clients issue a GET request against the subscriptions resource using a User + Application or Application-Only bearer token:
1698
1698
1699
1699
```http
1700
1700
GET https://api.contoso.com/files/v1.0/$subscriptions HTTP 1.1
0 commit comments