Skip to content

Commit bb84a59

Browse files
authored
Merge pull request #25761 from microsoftgraph/shiftsPromoteBetaToV1
Shifts promote beta to v1
2 parents 5b0c253 + c59bf5f commit bb84a59

33 files changed

+866
-915
lines changed

api-reference/beta/api/changetrackedentity-stagefordeletion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Draft changes are only visible to managers. Team members aren't sent notificatio
2020

2121
## Permissions
2222

23-
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).
23+
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions [only if your app requires it](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
2424

2525
<!-- {
2626
"blockType": "permissions",

api-reference/beta/api/openshift-post.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
title: "Create openShift"
3-
description: "Create an instance of openshift object."
3+
description: "Create an instance of openShift object."
44
ms.localizationpriority: medium
55
author: "akumar39"
66
ms.subservice: "teams"
77
doc_type: "apiPageType"
8+
ms.date: 11/30/2024
89
---
910

1011
# Create openShift
@@ -13,7 +14,7 @@ Namespace: microsoft.graph
1314

1415
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
1516

16-
Create an instance of an [openshift](../resources/openshift.md) object.
17+
Create an instance of an [openShift](../resources/openshift.md) object.
1718

1819
[!INCLUDE [national-cloud-support](../../includes/global-only.md)]
1920

@@ -56,7 +57,8 @@ The following example shows a request.
5657
# [HTTP](#tab/http)
5758
<!-- {
5859
"blockType": "request",
59-
"name": "openshift_post"
60+
"name": "openshift_post",
61+
"sampleKeys": ["788b75d2-a911-48c0-a5e2-dc98480457e3"]
6062
}-->
6163

6264
```http
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
title: "changeTrackedEntity: stageForDeletion"
3+
description: "Stage the deletion of an openShift, shift, or timeOff instance in a [schedule](../resources/schedule.md) in draft mode."
4+
author: "raulfernandes"
5+
ms.localizationpriority: medium
6+
ms.subservice: "teams"
7+
doc_type: apiPageType
8+
ms.date: 11/30/2024
9+
---
10+
11+
# changeTrackedEntity: stageForDeletion
12+
13+
Namespace: microsoft.graph
14+
15+
Stage the deletion of an [openShift](../resources/openshift.md), [shift](../resources/shift.md), or [timeOff](../resources/timeoff.md) instance in a [schedule](../resources/schedule.md) in draft mode.
16+
17+
Draft changes are only visible to managers. Team members aren't sent notification for draft changes. The deletion is finalized when the schedule is [shared](../api/schedule-share.md).
18+
19+
## Permissions
20+
21+
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions [only if your app requires it](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
22+
23+
<!-- {
24+
"blockType": "permissions",
25+
"name": "changetrackedentity-stagefordeletion-permissions"
26+
}
27+
-->
28+
[!INCLUDE [permissions-table](../includes/permissions/changetrackedentity-stagefordeletion-permissions.md)]
29+
30+
## HTTP request
31+
32+
For an **openShift**:
33+
<!-- {
34+
"blockType": "ignored"
35+
}
36+
-->
37+
``` http
38+
POST /teams/{teamsId}/schedule/openShifts/{openShiftId}/stageForDeletion
39+
```
40+
41+
For a **shift**:
42+
<!-- {
43+
"blockType": "ignored"
44+
}
45+
-->
46+
``` http
47+
POST /teams/{teamsId}/schedule/shifts/{shiftId}/stageForDeletion
48+
```
49+
50+
For a **timeOff**:
51+
<!-- {
52+
"blockType": "ignored"
53+
}
54+
-->
55+
``` http
56+
POST /teams/{teamsId}/schedule/timesOff/{timeOffId}/stageForDeletion
57+
```
58+
59+
## Request headers
60+
61+
|Name|Description|
62+
|:---|:---|
63+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
64+
| MS-APP-ACTS-AS | A user ID (GUID). Required only if the authorization token is an application token; otherwise, optional. |
65+
66+
## Request body
67+
68+
Don't supply a request body for this method.
69+
70+
## Response
71+
72+
If successful, this method returns a `204 No Content` response code.
73+
74+
## Examples
75+
76+
### Example 1: Stage the deletion of an openShift
77+
78+
The following example shows how to stage the deletion of an **openShift** in a **schedule** in draft mode.
79+
80+
#### Request
81+
82+
The following example shows a request.
83+
84+
<!-- {
85+
"blockType": "request",
86+
"name": "openshift.stagefordeletion",
87+
"sampleKeys": ["3d88b7a2-f988-4f4b-bb34-d66df66af126", "OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8"]
88+
}
89+
-->
90+
``` http
91+
POST https://graph.microsoft.com/v1.0/teams/3d88b7a2-f988-4f4b-bb34-d66df66af126/schedule/openShifts/OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8/stageForDeletion
92+
```
93+
94+
#### Response
95+
96+
The following example shows the response.
97+
98+
<!-- {
99+
"blockType": "response",
100+
"truncated": true
101+
}
102+
-->
103+
``` http
104+
HTTP/1.1 204 No Content
105+
```
106+
107+
### Example 2: Stage the deletion of a shift
108+
109+
The following example shows how to stage the deletion of a **shift** in a **schedule** in draft mode.
110+
111+
#### Request
112+
113+
The following example shows a request.
114+
115+
<!-- {
116+
"blockType": "request",
117+
"name": "shift.stagefordeletion",
118+
"sampleKeys": ["3d88b7a2-f988-4f4b-bb34-d66df66af126", "SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8"]
119+
}
120+
-->
121+
``` http
122+
POST https://graph.microsoft.com/v1.0/teams/3d88b7a2-f988-4f4b-bb34-d66df66af126/schedule/shifts/SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8/stageForDeletion
123+
```
124+
125+
#### Response
126+
127+
The following example shows the response.
128+
129+
<!-- {
130+
"blockType": "response",
131+
"truncated": true
132+
}
133+
-->
134+
``` http
135+
HTTP/1.1 204 No Content
136+
```
137+
138+
### Example 3: Stage the deletion of a timeOff
139+
140+
The following example shows how to stage the deletion of a **timeOff** in a **schedule** in draft mode.
141+
142+
#### Request
143+
144+
The following example shows a request.
145+
146+
<!-- {
147+
"blockType": "request",
148+
"name": "timeoff.stagefordeletion",
149+
"sampleKeys": ["3d88b7a2-f988-4f4b-bb34-d66df66af126", "SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8"]
150+
}
151+
-->
152+
``` http
153+
POST https://graph.microsoft.com/v1.0/teams/3d88b7a2-f988-4f4b-bb34-d66df66af126/schedule/timesOff/SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8/stageForDeletion
154+
```
155+
156+
#### Response
157+
158+
The following example shows the response.
159+
160+
<!-- {
161+
"blockType": "response",
162+
"truncated": true
163+
}
164+
-->
165+
``` http
166+
HTTP/1.1 204 No Content
167+
```

api-reference/v1.0/api/openshift-get.md

Lines changed: 31 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -117,56 +117,39 @@ The following example shows the response.
117117

118118
```http
119119
HTTP/1.1 200 OK
120-
Content-type: application/json
120+
Content-Type: application/json
121121
122122
{
123-
"id": "OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8",
124-
"schedulingGroupId": "TAG_228940ed-ff84-4e25-b129-1b395cf78be0",
125-
"sharedOpenShift": {
126-
"notes": "Inventory Management",
127-
"openSlotCount":2,
128-
"displayName": "Day shift",
129-
"startDateTime": "2018-10-04T00:58:45.340Z",
130-
"endDateTime": "2018-10-04T09:50:45.332Z",
131-
"theme": "white",
132-
"activities": [
133-
{
134-
"isPaid": true,
135-
"startDateTime": "2018-10-04T00:58:45.340Z",
136-
"endDateTime": "2018-10-04T01:58:45.340Z",
137-
"code": "",
138-
"displayName": "Lunch"
139-
}
140-
]
141-
},
142-
"draftOpenShift": {
143-
"notes": "Inventory Management",
144-
"openSlotCount":3,
145-
"displayName": "Day shift",
146-
"startDateTime": "2018-10-04T00:58:45.332Z",
147-
"endDateTime": "2018-10-04T08:58:45.340Z",
148-
"theme": "white",
149-
"activities": [
150-
{
151-
"isPaid": true,
152-
"startDateTime": "2018-10-04T00:58:45.340Z",
153-
"endDateTime": "2018-10-04T07:58:45.332Z",
154-
"code": "Break",
155-
"displayName": "Lunch"
156-
}
157-
]
158-
},
159-
"createdDateTime": "2019-03-14T04:32:51.451Z",
160-
"lastModifiedDateTime": "2019-03-14T05:32:51.451Z",
161-
"lastModifiedBy": {
162-
"application": null,
163-
"device": null,
164-
"conversation": null,
165-
"user": {
166-
"id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
167-
"displayName": "John Doe"
168-
}
169-
}
123+
"id": "OPNSHFT_d8da84aa-0138-45f9-9ac7-5d06712211d3",
124+
"createdDateTime": "2024-11-08T22:11:18.091Z",
125+
"lastModifiedDateTime": "2024-11-08T22:11:18.091Z",
126+
"schedulingGroupId": "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a",
127+
"isStagedForDeletion": false,
128+
"draftOpenShift": null,
129+
"lastModifiedBy": {
130+
"application": null,
131+
"device": null,
132+
"user": {
133+
"id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
134+
"displayName": "John Doe",
135+
"userIdentityType": "aadUser",
136+
"tenantId": null
137+
}
138+
},
139+
"sharedOpenShift": {
140+
"displayName": null,
141+
"startDateTime": "2024-11-04T20:00:00Z",
142+
"endDateTime": "2024-11-04T21:00:00Z",
143+
"theme": "blue",
144+
"notes": null,
145+
"openSlotCount": 1,
146+
"activities": []
147+
},
148+
"schedulingGroupInfo": {
149+
"displayName": "",
150+
"schedulingGroupId": "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a",
151+
"code": null
152+
}
170153
}
171154
```
172155

api-reference/v1.0/api/openshift-list.md

Lines changed: 33 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -120,57 +120,40 @@ HTTP/1.1 200 OK
120120
Content-type: application/json
121121
122122
{
123-
"value": [
124-
{
125-
"id": "OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8",
126-
"schedulingGroupId": "TAG_228940ed-ff84-4e25-b129-1b395cf78be0",
127-
"sharedOpenShift": {
128-
"notes": "Inventory Management",
129-
"openSlotCount": 2,
130-
"displayName": "Day shift",
131-
"startDateTime": "2018-10-04T00:58:45.340Z",
132-
"endDateTime": "2018-10-04T09:50:45.332Z",
133-
"theme": "white",
134-
"activities": [
135-
{
136-
"isPaid": true,
137-
"startDateTime": "2018-10-04T00:58:45.340Z",
138-
"endDateTime": "2018-10-04T01:58:45.340Z",
139-
"code": "",
140-
"displayName": "Lunch"
141-
}
142-
]
143-
},
144-
"draftOpenShift": {
145-
"notes": "Inventory Management",
146-
"openSlotCount": 3,
147-
"displayName": "Day shift",
148-
"startDateTime": "2018-10-04T00:58:45.332Z",
149-
"endDateTime": "2018-10-04T08:58:45.340Z",
150-
"theme": "white",
151-
"activities": [
152-
{
153-
"isPaid": true,
154-
"startDateTime": "2018-10-04T00:58:45.340Z",
155-
"endDateTime": "2018-10-04T07:58:45.332Z",
156-
"code": "Break",
157-
"displayName": "Lunch"
158-
}
159-
]
160-
},
161-
"createdDateTime": "2019-03-14T04:32:51.451Z",
162-
"lastModifiedDateTime": "2019-03-14T05:32:51.451Z",
163-
"lastModifiedBy": {
164-
"application": null,
165-
"device": null,
166-
"conversation": null,
167-
"user": {
168-
"id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
169-
"displayName": "John Doe"
123+
"value": [
124+
{
125+
"id": "OPNSHFT_d8da84aa-0138-45f9-9ac7-5d06712211d3",
126+
"createdDateTime": "2024-11-08T22:11:18.091Z",
127+
"lastModifiedDateTime": "2024-11-08T22:11:18.091Z",
128+
"schedulingGroupId": "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a",
129+
"isStagedForDeletion": false,
130+
"draftOpenShift": null,
131+
"lastModifiedBy": {
132+
"application": null,
133+
"device": null,
134+
"user": {
135+
"id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
136+
"displayName": "John Doe",
137+
"userIdentityType": "aadUser",
138+
"tenantId": null
139+
}
140+
},
141+
"sharedOpenShift": {
142+
"displayName": null,
143+
"startDateTime": "2024-11-04T20:00:00Z",
144+
"endDateTime": "2024-11-04T21:00:00Z",
145+
"theme": "blue",
146+
"notes": null,
147+
"openSlotCount": 1,
148+
"activities": []
149+
},
150+
"schedulingGroupInfo": {
151+
"displayName": "",
152+
"schedulingGroupId": "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a",
153+
"code": null
154+
}
170155
}
171-
}
172-
}
173-
]
156+
]
174157
}
175158
```
176159

0 commit comments

Comments
 (0)