Skip to content

Latest commit

 

History

History
146 lines (109 loc) · 4.52 KB

File metadata and controls

146 lines (109 loc) · 4.52 KB
title Get shift
description Retrieve the properties and relationships of a shift object by ID.
ms.date 11/21/2024
author victorcheng
ms.localizationpriority medium
ms.subservice teams
doc_type apiPageType

Get shift

Namespace: microsoft.graph

Retrieve the properties and relationships of a shift object by ID.

[!INCLUDE national-cloud-support]

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. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

GET /teams/{teamId}/schedule/shifts/{shiftId}

Optional query parameters

This method doesn't support OData query parameters to customize the response.

Request headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
MS-APP-ACTS-AS (deprecated) A user ID (GUID). Required only if the authorization token is an application token; otherwise, optional. The MS-APP-ACTS-AS header is deprecated and no longer required with application tokens.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a shift object in the response body.

Example

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/teams/{teamId}/schedule/shifts/{shiftId}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
  "id": "SHFT_ca485cdd-a42c-4b93-9e6a-6fa54fd45fe1",
  "createdDateTime": "2019-06-06T20:15:38.9Z",
  "lastModifiedDateTime": "2019-11-18T01:12:08.318Z",
  "schedulingGroupId": "TAG_d18fd675-3ac8-41b2-8038-d17fdac8b0d3",
  "userId": "a7b0c8c4-3f5c-492f-ab13-40f0e0f0ffa8",
  "draftShift": null,
  "lastModifiedBy": {
    "application": null,
    "device": null,
    "conversation": null,
    "user": {
      "id": "366c0b19-49b1-41b5-a03f-9f3887bd0ed8",
      "displayName": "John Doe"
    }
  },
  "isStagedForDeletion": false
}