Redigera

Dela via


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.

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.

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 time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
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.
lastModifiedBy identitySet The identity that last updated this shift.
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 time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
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.

{
  "createdDateTime": "DateTimeOffset",
  "draftShift": { "@odata.type": "microsoft.graph.shiftItem" },
  "id": "String",
  "lastModifiedBy": { "@odata.type": "microsoft.graph.identitySet" },
  "lastModifiedDateTime": "DateTimeOffset",
  "schedulingGroupId": "String",
  "sharedShift": { "@odata.type": "microsoft.graph.shiftItem" },
  "userId": "String"
}