Skip to content

Commit

Permalink
Merge pull request #25761 from microsoftgraph/shiftsPromoteBetaToV1
Browse files Browse the repository at this point in the history
Shifts promote beta to v1
  • Loading branch information
Lauragra authored Dec 5, 2024
2 parents 5b0c253 + c59bf5f commit bb84a59
Show file tree
Hide file tree
Showing 33 changed files with 866 additions and 915 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Draft changes are only visible to managers. Team members aren't sent notificatio

## Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).
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).

<!-- {
"blockType": "permissions",
Expand Down
8 changes: 5 additions & 3 deletions api-reference/beta/api/openshift-post.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: "Create openShift"
description: "Create an instance of openshift object."
description: "Create an instance of openShift object."
ms.localizationpriority: medium
author: "akumar39"
ms.subservice: "teams"
doc_type: "apiPageType"
ms.date: 11/30/2024
---

# Create openShift
Expand All @@ -13,7 +14,7 @@ Namespace: microsoft.graph

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

Create an instance of an [openshift](../resources/openshift.md) object.
Create an instance of an [openShift](../resources/openshift.md) object.

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

Expand Down Expand Up @@ -56,7 +57,8 @@ The following example shows a request.
# [HTTP](#tab/http)
<!-- {
"blockType": "request",
"name": "openshift_post"
"name": "openshift_post",
"sampleKeys": ["788b75d2-a911-48c0-a5e2-dc98480457e3"]
}-->

```http
Expand Down
167 changes: 167 additions & 0 deletions api-reference/v1.0/api/changetrackedentity-stagefordeletion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
title: "changeTrackedEntity: stageForDeletion"
description: "Stage the deletion of an openShift, shift, or timeOff instance in a [schedule](../resources/schedule.md) in draft mode."
author: "raulfernandes"
ms.localizationpriority: medium
ms.subservice: "teams"
doc_type: apiPageType
ms.date: 11/30/2024
---

# changeTrackedEntity: stageForDeletion

Namespace: microsoft.graph

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.

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).

## Permissions

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).

<!-- {
"blockType": "permissions",
"name": "changetrackedentity-stagefordeletion-permissions"
}
-->
[!INCLUDE [permissions-table](../includes/permissions/changetrackedentity-stagefordeletion-permissions.md)]

## HTTP request

For an **openShift**:
<!-- {
"blockType": "ignored"
}
-->
``` http
POST /teams/{teamsId}/schedule/openShifts/{openShiftId}/stageForDeletion
```

For a **shift**:
<!-- {
"blockType": "ignored"
}
-->
``` http
POST /teams/{teamsId}/schedule/shifts/{shiftId}/stageForDeletion
```

For a **timeOff**:
<!-- {
"blockType": "ignored"
}
-->
``` http
POST /teams/{teamsId}/schedule/timesOff/{timeOffId}/stageForDeletion
```

## Request headers

|Name|Description|
|:---|:---|
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
| MS-APP-ACTS-AS | A user ID (GUID). Required only if the authorization token is an application token; otherwise, optional. |

## Request body

Don't supply a request body for this method.

## Response

If successful, this method returns a `204 No Content` response code.

## Examples

### Example 1: Stage the deletion of an openShift

The following example shows how to stage the deletion of an **openShift** in a **schedule** in draft mode.

#### Request

The following example shows a request.

<!-- {
"blockType": "request",
"name": "openshift.stagefordeletion",
"sampleKeys": ["3d88b7a2-f988-4f4b-bb34-d66df66af126", "OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8"]
}
-->
``` http
POST https://graph.microsoft.com/v1.0/teams/3d88b7a2-f988-4f4b-bb34-d66df66af126/schedule/openShifts/OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8/stageForDeletion
```

#### Response

The following example shows the response.

<!-- {
"blockType": "response",
"truncated": true
}
-->
``` http
HTTP/1.1 204 No Content
```

### Example 2: Stage the deletion of a shift

The following example shows how to stage the deletion of a **shift** in a **schedule** in draft mode.

#### Request

The following example shows a request.

<!-- {
"blockType": "request",
"name": "shift.stagefordeletion",
"sampleKeys": ["3d88b7a2-f988-4f4b-bb34-d66df66af126", "SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8"]
}
-->
``` http
POST https://graph.microsoft.com/v1.0/teams/3d88b7a2-f988-4f4b-bb34-d66df66af126/schedule/shifts/SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8/stageForDeletion
```

#### Response

The following example shows the response.

<!-- {
"blockType": "response",
"truncated": true
}
-->
``` http
HTTP/1.1 204 No Content
```

### Example 3: Stage the deletion of a timeOff

The following example shows how to stage the deletion of a **timeOff** in a **schedule** in draft mode.

#### Request

The following example shows a request.

<!-- {
"blockType": "request",
"name": "timeoff.stagefordeletion",
"sampleKeys": ["3d88b7a2-f988-4f4b-bb34-d66df66af126", "SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8"]
}
-->
``` http
POST https://graph.microsoft.com/v1.0/teams/3d88b7a2-f988-4f4b-bb34-d66df66af126/schedule/timesOff/SHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8/stageForDeletion
```

#### Response

The following example shows the response.

<!-- {
"blockType": "response",
"truncated": true
}
-->
``` http
HTTP/1.1 204 No Content
```
79 changes: 31 additions & 48 deletions api-reference/v1.0/api/openshift-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,56 +117,39 @@ The following example shows the response.

```http
HTTP/1.1 200 OK
Content-type: application/json
Content-Type: application/json
{
"id": "OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8",
"schedulingGroupId": "TAG_228940ed-ff84-4e25-b129-1b395cf78be0",
"sharedOpenShift": {
"notes": "Inventory Management",
"openSlotCount":2,
"displayName": "Day shift",
"startDateTime": "2018-10-04T00:58:45.340Z",
"endDateTime": "2018-10-04T09:50:45.332Z",
"theme": "white",
"activities": [
{
"isPaid": true,
"startDateTime": "2018-10-04T00:58:45.340Z",
"endDateTime": "2018-10-04T01:58:45.340Z",
"code": "",
"displayName": "Lunch"
}
]
},
"draftOpenShift": {
"notes": "Inventory Management",
"openSlotCount":3,
"displayName": "Day shift",
"startDateTime": "2018-10-04T00:58:45.332Z",
"endDateTime": "2018-10-04T08:58:45.340Z",
"theme": "white",
"activities": [
{
"isPaid": true,
"startDateTime": "2018-10-04T00:58:45.340Z",
"endDateTime": "2018-10-04T07:58:45.332Z",
"code": "Break",
"displayName": "Lunch"
}
]
},
"createdDateTime": "2019-03-14T04:32:51.451Z",
"lastModifiedDateTime": "2019-03-14T05:32:51.451Z",
"lastModifiedBy": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
"displayName": "John Doe"
}
}
"id": "OPNSHFT_d8da84aa-0138-45f9-9ac7-5d06712211d3",
"createdDateTime": "2024-11-08T22:11:18.091Z",
"lastModifiedDateTime": "2024-11-08T22:11:18.091Z",
"schedulingGroupId": "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a",
"isStagedForDeletion": false,
"draftOpenShift": null,
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
"displayName": "John Doe",
"userIdentityType": "aadUser",
"tenantId": null
}
},
"sharedOpenShift": {
"displayName": null,
"startDateTime": "2024-11-04T20:00:00Z",
"endDateTime": "2024-11-04T21:00:00Z",
"theme": "blue",
"notes": null,
"openSlotCount": 1,
"activities": []
},
"schedulingGroupInfo": {
"displayName": "",
"schedulingGroupId": "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a",
"code": null
}
}
```

Expand Down
83 changes: 33 additions & 50 deletions api-reference/v1.0/api/openshift-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,57 +120,40 @@ HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "OPNSHFT_577b75d2-a927-48c0-a5d1-dc984894e7b8",
"schedulingGroupId": "TAG_228940ed-ff84-4e25-b129-1b395cf78be0",
"sharedOpenShift": {
"notes": "Inventory Management",
"openSlotCount": 2,
"displayName": "Day shift",
"startDateTime": "2018-10-04T00:58:45.340Z",
"endDateTime": "2018-10-04T09:50:45.332Z",
"theme": "white",
"activities": [
{
"isPaid": true,
"startDateTime": "2018-10-04T00:58:45.340Z",
"endDateTime": "2018-10-04T01:58:45.340Z",
"code": "",
"displayName": "Lunch"
}
]
},
"draftOpenShift": {
"notes": "Inventory Management",
"openSlotCount": 3,
"displayName": "Day shift",
"startDateTime": "2018-10-04T00:58:45.332Z",
"endDateTime": "2018-10-04T08:58:45.340Z",
"theme": "white",
"activities": [
{
"isPaid": true,
"startDateTime": "2018-10-04T00:58:45.340Z",
"endDateTime": "2018-10-04T07:58:45.332Z",
"code": "Break",
"displayName": "Lunch"
}
]
},
"createdDateTime": "2019-03-14T04:32:51.451Z",
"lastModifiedDateTime": "2019-03-14T05:32:51.451Z",
"lastModifiedBy": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
"displayName": "John Doe"
"value": [
{
"id": "OPNSHFT_d8da84aa-0138-45f9-9ac7-5d06712211d3",
"createdDateTime": "2024-11-08T22:11:18.091Z",
"lastModifiedDateTime": "2024-11-08T22:11:18.091Z",
"schedulingGroupId": "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a",
"isStagedForDeletion": false,
"draftOpenShift": null,
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
"displayName": "John Doe",
"userIdentityType": "aadUser",
"tenantId": null
}
},
"sharedOpenShift": {
"displayName": null,
"startDateTime": "2024-11-04T20:00:00Z",
"endDateTime": "2024-11-04T21:00:00Z",
"theme": "blue",
"notes": null,
"openSlotCount": 1,
"activities": []
},
"schedulingGroupInfo": {
"displayName": "",
"schedulingGroupId": "TAG_4ab7d329-1f7e-4eaf-ba93-63f1ff3f3c4a",
"code": null
}
}
}
}
]
]
}
```

Expand Down
Loading

0 comments on commit bb84a59

Please sign in to comment.