CData Python Connector for Microsoft Teams

Build 25.0.9440

Shifts

Captures detailed shift assignments, including assigned user, start and end times, and optional shift notes.

テーブル固有の情報

Select

チームからすべてを取得するか、TeamId を'=' とIN 演算子で指定することでShifts テーブルをクエリします。デフォルトでは、自身がメンバーであるグループのチームのシフトのみ返されます。組織の全グループのチームのシフトアイテムを取得するには、IncludeAllGroups プロパティをtrue に設定してください。 本製品 は Microsoft Teams API を使用して、以下のカラムと演算子で作成されたWHERE 句条件を処理します。その他のフィルタはクライアントサイドで本製品 内部で処理されます。

  • TeamId は、'=' およびIN 演算子をサポートします。
  • Id は、'=' 演算子をサポートします。

例えば、次のクエリはサーバーサイドで処理されます。

SELECT * FROM Shifts WHERE TeamId IN ('da838338-4e77-4c05-82a6-79d9f0274511', 'da834568-4df7-4c05-82a6-79d9f0274515')
SELECT * FROM Shifts WHERE Id = 'SHFT_aac21ce9-82b3-4ad1-a841-dadb570c8ebf' AND TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'

Insert

チームスケジュールにシフトを挿入するには、TeamId とこの休暇が付与される人のUserId に加えて、休暇のstartDateTime およびendDateTime を含むDraftShift またはSharedShift の情報の、どちらか1つを含む必要があります。

INSERT INTO Shifts (TeamId, UserId, draftShift_startDateTime, draftShift_endDateTime) VALUES ('da838338-4e77-4c05-82a6-79d9f0274511', '0409f710-2aa9-4f05-8944-ef382160f1d1', '2019-07-17T07:00:00Z', '2019-07-17T15:00:00Z')
INSERT INTO Shifts (TeamId, UserId, sharedShift_startDateTime, sharedShift_endDateTime) VALUES ('da838338-4e77-4c05-82a6-79d9f0274511', '0409f710-2aa9-4f05-8944-ef382160f1d1', '2019-07-17T07:00:00Z', '2019-07-17T15:00:00Z')

Update

シフトのレコードを更新するには、WHERE 句にId とTeamId が必要です。TeamId、Id、CreatedDateTime 以外のすべてのフィールドを更新できます。

UPDATE Shifts SET draftShift_theme = 'blue', draftShift_displayname = 'somename' WHERE Id = 'SHFT_aac21ce9-82b3-4ad1-a841-dadb570c8ebf' AND TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'

Delete

シフトのレコードを削除するには、WHERE 句にId とTeamId が必要です。

DELETE FROM Shifts WHERE TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511' AND Id = 'SHFT_aac21ce9-82b3-4ad1-a841-dadb570c8ebf'

Columns

Name Type ReadOnly Description
Id [KEY] String False

A unique identifier for the shift record.

TeamId String False

The identifier of the Microsoft Team to which this shift belongs.

UserId String False

The unique identifier of the user assigned to this shift.

CreatedDateTime Datetime False

The date and time when the shift was first created.

IsStagedForDeletion Bool False

Indicates whether the shift is marked for deletion but has not yet been removed.

LastModifiedBy_application_displayName String False

The name of the application that most recently modified the shift.

LastModifiedBy_application_id String False

The unique application ID of the system or app that last updated the shift.

LastModifiedDateTime Datetime False

The date and time of the last update to the shift.

DraftShift_activities String False

A list of segments in the draft version of the shift, such as work assignments, breaks, or lunches, specifying what the employee is doing and when.

DraftShift_displayName String False

A label assigned to the draft version of the shift for easier identification in the schedule.

DraftShift_notes String False

Optional notes added to the draft shift, such as instructions or important reminders.

DraftShift_startDateTime Datetime False

The scheduled start time of the draft shift.

DraftShift_endDateTime Datetime False

The scheduled end time of the draft shift.

SchedulingGroupId String False

The identifier of the scheduling group to which this shift is assigned.

SharedShift_activities String False

A list of activities in the published (shared) version of the shift, such as assignments, breaks, or other scheduled duties.

SharedShift_displayName String False

A label assigned to the shared version of the shift for users to see on the calendar.

SharedShift_notes String False

Optional notes attached to the shared version of the shift for team member reference.

SharedShift_startDateTime Datetime False

The published start time of the shift that is visible to the user.

SharedShift_endDateTime Datetime False

The published end time of the shift that is visible to the user.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9440