편집

다음을 통해 공유


shift resource type

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Represents a unit of scheduled work in a schedule.

The duration of a shift can't be less than 1 minute or longer than 24 hours.

Inherits from changeTrackedEntity.

Methods

Method Return Type Description
Create shift Create a new shift.
List shift collection Get the list of shifts in this schedule.
Get shift Get a shift by ID.
Replace shift Replace a shift.
Delete None Delete a shift from the schedule.
Stage for deletion None Stage the deletion of a shift instance in a schedule in draft mode.

Properties

Property Type Description
createdBy identitySet Identity of the user who created the shift object. Inherited from changeTrackedEntity.
createdDateTime DateTimeOffset The timestamp on which this shift was first created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Inherited from changeTrackedEntity.
draftShift shiftItem Draft changes in the shift. Draft changes are only visible to managers. The changes are visible to employees when they're shared, which copies the changes from the draftShift to the sharedShift property.
id String The unique identifier for the shift. Inherited from changeTrackedEntity.
isStagedForDeletion Boolean The shift is marked for deletion, a process that is finalized when the schedule is shared.
lastModifiedBy identitySet The identity of the user who last updated this shift. Inherited from changeTrackedEntity.
lastModifiedDateTime DateTimeOffset The timestamp on which this shift was last updated. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Inherited from changeTrackedEntity.
schedulingGroupId String ID of the scheduling group the shift is part of. Required.
schedulingGroupInfo schedulingGroupInfo Information of the scheduling group the shift is part of.
sharedShift shiftItem The shared version of this shift that is viewable by both employees and managers. Updates to the sharedShift property send notifications to users in the Teams client.
teamInfo shiftsTeamInfo Information of the team that the shift is in.
userId String ID of the user assigned to the shift. Required.
userInfo shiftsUserInfo Information of the user assigned to the shift.

JSON representation

The following JSON representation shows the resource type.

{
  "createdBy": {"@odata.type": "microsoft.graph.identitySet"},
  "createdDateTime": "String (timestamp)",
  "draftShift": { "@odata.type": "microsoft.graph.shiftItem" },
  "id": "String (identifier)",
  "isStagedForDeletion": "Boolean",
  "lastModifiedBy": { "@odata.type": "microsoft.graph.identitySet" },
  "lastModifiedDateTime": "String (timestamp)",
  "schedulingGroupId": "String",
  "schedulingGroupInfo": "microsoft.graph.schedulingGroupInfo",
  "sharedShift": { "@odata.type": "microsoft.graph.shiftItem" },
  "teamInfo": "microsoft.graph.shiftsTeamInfo",
  "userId": "String",
  "userInfo": "microsoft.graph.shiftsUserInfo"
}