편집

다음을 통해 공유


Get shift

Namespace: microsoft.graph

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

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

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.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) Group.Read.All Schedule.ReadWrite.All, Group.ReadWrite.All, Schedule.Read.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application Schedule.Read.All Schedule.ReadWrite.All

HTTP request

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

Optional query parameters

This method does not 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 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 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}

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": "1c717a55-febd-4850-b5f6-101f3a29972c",
			"displayName": "Sumanth Lingom"
		}
	}
}