Skip to content

Commit 55a3bda

Browse files
author
jsinghmokha
committed
Improve If-Match/ETag clarity for developers
- If-Match now mentions both @microsoft.graph.sectionsVersion and @odata.etag as equivalent sources, so developers don't need an extra list call when they already have a section object - Add NOTE callout in create, update, add-item, and move responses telling developers to use the updated @odata.etag for subsequent mutation operations
1 parent 70c03da commit 55a3bda

7 files changed

Lines changed: 19 additions & 7 deletions

api-reference/beta/api/teamworksection-delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ DELETE /users/{user-id}/teamwork/sections/{teamworkSection-id}
3737
| Header | Value |
3838
|:-------|:------|
3939
| Authorization | Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts). |
40-
| If-Match | The value of the **@microsoft.graph.sectionsVersion** property previously retrieved from [listing sections](userteamwork-list-sections.md). Required for optimistic concurrency control. |
40+
| If-Match | The value of the **@microsoft.graph.sectionsVersion** annotation from [listing sections](userteamwork-list-sections.md), or equivalently the **@odata.etag** value from any previously retrieved [section](../resources/teamworksection.md). Required for optimistic concurrency control. |
4141

4242
## Request body
4343

api-reference/beta/api/teamworksection-get.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This method doesn't support [OData query parameters](/graph/query-parameters) to
4141
| Header | Value |
4242
|:-------|:------|
4343
| Authorization | Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts). |
44-
| If-None-Match | The value of the **@microsoft.graph.sectionsVersion** property previously retrieved from [listing sections](userteamwork-list-sections.md). If the section hierarchy didn't change, this header causes a `304 Not Modified` response. Optional. |
44+
| If-None-Match | The value of the **@microsoft.graph.sectionsVersion** annotation from [listing sections](userteamwork-list-sections.md), or equivalently the **@odata.etag** value from any previously retrieved [section](../resources/teamworksection.md). If the section hierarchy didn't change, this header causes a `304 Not Modified` response. Optional. |
4545

4646
## Request body
4747

api-reference/beta/api/teamworksection-post-items.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ POST /users/{user-id}/teamwork/sections/{teamworkSection-id}/items
3838
|:-------|:------|
3939
| Authorization | Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts). |
4040
| Content-Type | application/json. Required. |
41-
| If-Match | The value of the **@microsoft.graph.sectionsVersion** property previously retrieved from [listing sections](userteamwork-list-sections.md). Required for optimistic concurrency control. |
41+
| If-Match | The value of the **@microsoft.graph.sectionsVersion** annotation from [listing sections](userteamwork-list-sections.md), or equivalently the **@odata.etag** value from any previously retrieved [section](../resources/teamworksection.md). Required for optimistic concurrency control. |
4242

4343
## Request body
4444

@@ -54,6 +54,9 @@ The following table lists the properties that you can set when you add a **teamw
5454

5555
If successful, this method returns a `201 Created` response code and a [teamworkSectionItem](../resources/teamworksectionitem.md) object in the response body.
5656

57+
> [!NOTE]
58+
> The response includes an updated **@odata.etag** value. Use this value as the `If-Match` header for any subsequent mutation operations.
59+
5760
The following errors can occur:
5861

5962
| Scenario | HTTP code | Error code | Message |

api-reference/beta/api/teamworksection-update.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PATCH /users/{user-id}/teamwork/sections/{teamworkSection-id}
3838
|:-------|:------|
3939
| Authorization | Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts). |
4040
| Content-Type | application/json. Required. |
41-
| If-Match | The value of the **@microsoft.graph.sectionsVersion** property previously retrieved from [listing sections](userteamwork-list-sections.md). Required for optimistic concurrency control. |
41+
| If-Match | The value of the **@microsoft.graph.sectionsVersion** annotation from [listing sections](userteamwork-list-sections.md), or equivalently the **@odata.etag** value from any previously retrieved [section](../resources/teamworksection.md). Required for optimistic concurrency control. |
4242

4343
## Request body
4444

@@ -61,6 +61,9 @@ In the request body, supply a JSON representation of only the properties to upda
6161

6262
If successful, this method returns a `200 OK` response code and an updated [teamworkSection](../resources/teamworksection.md) object in the response body.
6363

64+
> [!NOTE]
65+
> The response includes an updated **@odata.etag** value. Use this value as the `If-Match` header for any subsequent mutation operations.
66+
6467
If the request specifies an unsupported **sortType** for the section type, this method returns a `400 Bad Request` response code. For more information, see the [Request body](#request-body) section.
6568

6669
## Examples

api-reference/beta/api/teamworksectionitem-delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ DELETE /users/{user-id}/teamwork/sections/{teamworkSection-id}/items/{teamworkSe
3737
| Header | Value |
3838
|:-------|:------|
3939
| Authorization | Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts). |
40-
| If-Match | The value of the **@microsoft.graph.sectionsVersion** property previously retrieved from [listing sections](userteamwork-list-sections.md). Required for optimistic concurrency control. |
40+
| If-Match | The value of the **@microsoft.graph.sectionsVersion** annotation from [listing sections](userteamwork-list-sections.md), or equivalently the **@odata.etag** value from any previously retrieved [section](../resources/teamworksection.md). Required for optimistic concurrency control. |
4141

4242
## Request body
4343

api-reference/beta/api/teamworksectionitem-move.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ POST /users/{user-id}/teamwork/sections/{teamworkSection-id}/items/{teamworkSect
3838
|:-------|:------|
3939
| Authorization | Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts). |
4040
| Content-Type | application/json. Required. |
41-
| If-Match | The value of the **@microsoft.graph.sectionsVersion** property previously retrieved from [listing sections](userteamwork-list-sections.md). Required for optimistic concurrency control. |
41+
| If-Match | The value of the **@microsoft.graph.sectionsVersion** annotation from [listing sections](userteamwork-list-sections.md), or equivalently the **@odata.etag** value from any previously retrieved [section](../resources/teamworksection.md). Required for optimistic concurrency control. |
4242

4343
## Request body
4444

@@ -54,6 +54,9 @@ The following table lists the parameters that are required when you call this ac
5454

5555
If successful, this action returns a `200 OK` response code and a [teamworkSectionItem](../resources/teamworksectionitem.md) in the response body that represents the item in the target section.
5656

57+
> [!NOTE]
58+
> The response includes an updated **@odata.etag** value. Use this value as the `If-Match` header for any subsequent mutation operations.
59+
5760
## Examples
5861

5962
### Request

api-reference/beta/api/userteamwork-post-sections.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ POST /users/{user-id}/teamwork/sections
3838
|:-------|:------|
3939
| Authorization | Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts). |
4040
| Content-Type | application/json. Required. |
41-
| If-Match | The value of the **@microsoft.graph.sectionsVersion** property previously retrieved from [listing sections](userteamwork-list-sections.md). Required for optimistic concurrency control. |
41+
| If-Match | The value of the **@microsoft.graph.sectionsVersion** annotation from [listing sections](userteamwork-list-sections.md), or equivalently the **@odata.etag** value from any previously retrieved [section](../resources/teamworksection.md). Required for optimistic concurrency control. |
4242

4343
## Request body
4444

@@ -57,6 +57,9 @@ The following table lists the properties that you can set when you create a **te
5757

5858
If successful, this method returns a `201 Created` response code and a [teamworkSection](../resources/teamworksection.md) object in the response body.
5959

60+
> [!NOTE]
61+
> The response includes an updated **@odata.etag** value. Use this value as the `If-Match` header for any subsequent mutation operations.
62+
6063
## Examples
6164

6265
### Request

0 commit comments

Comments
 (0)