获取 shiftGet shift

命名空间:microsoft.graphNamespace: microsoft.graph

按 ID 检索shift对象的属性和关系。Retrieve the properties and relationships of a shift object by ID.

权限Permissions

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) 请参阅 all、Group、Group. all、Schedule、Group、Group。所有Schedule.Read.All, Group.Read.All, Schedule.ReadWrite.All, Group.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application Schedule. All、Schedule、AllSchedule.Read.All, Schedule.ReadWrite.All

注意:此 API 支持管理员权限。Note: This API supports admin permissions. 全局管理员可以访问他们不是其成员的组。Global admins can access groups that they are not a member of.

HTTP 请求HTTP request

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

可选的查询参数Optional query parameters

此方法不支持 OData 查询参数来自定义响应。This method does not support OData query parameters to customize the response.

请求标头Request headers

标头Header Value
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.

请求正文Request body

请勿提供此方法的请求正文。Do not supply a request body for this method.

响应Response

如果成功,此方法 200 OK 在响应正文中返回响应代码和shift对象。If successful, this method returns a 200 OK response code and a shift object in the response body.

示例Example

请求Request

下面展示了示例请求。The following is an example of the request.

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

响应Response

下面展示了示例响应。The following is an example of the response.

注意: 为了提高可读性,可能缩短了此处显示的响应对象。所有属性都将通过实际调用返回。Note: The response object shown here might be shortened for readability. All the properties will be returned from an actual call.

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

{
    "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"
        }
    }
}