Upravit

Sdílet prostřednictvím


shift resource type

Namespace: microsoft.graph

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
List shift collection Get the list of shifts in this schedule.
Create shift Create a new shift.
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

Name Type Description
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 are shared, which copies the changes from the draftShift to the sharedShift property.
id String ID of 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 that 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.
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.
userId String ID of the user assigned to the shift. Required.

JSON representation

The following JSON representation shows the resource.

{
  "@odata.type": "#microsoft.graph.shift",
  "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",
  "sharedShift": {"@odata.type": "microsoft.graph.shiftItem"},
  "userId": "String"
}