Events
Query, create, modify, and delete regarding events.
Select
connector は Garoon API を使用して、以下のカラムと演算子で構築されたWHERE 句条件を処理します。その他のフィルタはクライアントサイドでconnector 内部で処理されます。
- DateTime は<、<=、=、>= および > 演算子をサポートします。
- TargetType は'=' 演算子をサポートします。
- Target は'=' 演算子をサポートします。
NOTE: Target フィールドとTargetType フィールドは、クエリで両方使用する必要があります(つまり、Target フィールドがクエリで指定されている場合、TargetType フィールドも必須であり、その逆も同様です)。
例えば、次のクエリはサーバーサイドで処理されます。
SELECT * FROM Events WHERE DateTime >= '2019-11-22 00:00:00.0' SELECT * FROM Events WHERE DateTime > '2019-11-22 00:00:00.0' SELECT * FROM Events WHERE targetType = 'user' AND target = '4'
Update
ReadOnly がfalse のカラムを更新できます。
UPDATE Events SET EventMenu = 'test', Subject = 'test', Notes = 'TEMPORARY', visibilityType = 'PRIVATE', useAttendanceCheck = false, CompanyInfoName = 'CompanyName', CompanyInfoZipCode = 'CompanyZipCode', CompanyInfoAddress = 'CompanyAddress', CompanyInfoRoute = 'CompanyRoute', CompanyInfoRouteTime = '2020', CompanyInfoRouteFare = '223', CompanyInfoPhone = '24342232342' , StartDateTime = '2019-01-28T06:51:24Z', StartTimeZone = 'Asia/Tokyo', EndDateTime = '2019-01-28T06:51:24Z', EndTimeZone = 'Asia/Tokyo', isAllDay = true, isStartOnly = false, AdditionalItemsItemValue = 'test' WHERE Id = 35
テンポラリテーブルの使用:
INSERT INTO Watchers#TEMP (Code, Type) VALUES ('User1', 'USER')
INSERT INTO Watchers#TEMP (Code, Type) VALUES ('User2', 'USER')
INSERT INTO Watchers#TEMP (Code, Type) VALUES ('User3', 'USER')
UPDATE Events SET Watchers = 'Watchers#TEMP' WHERE Id = 35
集計の使用:
UPDATE Events SET Watchers = '[
{
"type": "USER",
"code": "c000001"
}
]', visibilityType = 'SET_PRIVATE_WATCHERS' WHERE Id = 35
UPDATE Events SET Attendees = '[
{
"type": "USER",
"code": "c000001"
}
]' WHERE Id = 35
UPDATE Events SET facilities = '[
{
"code": "F001"
}
]' WHERE Id = 35
Insert
Event を追加するには、次のカラムの組み合わせの少なくとも1つを指定する必要があります。
a) EventType、StartDateTime、StartTimeZone、EndDateTime、EndTimeZone およびFacilities カラム。
b) EventType、StartDateTime、StartTimeZone、EndDateTime、EndTimeZone およびAttendees カラム。
c) EventType、StartDateTime、StartTimeZone、IsStartOnly(true) およびFacilities カラム。
d) EventType、StartDateTime、StartTimeZone、IsStartOnly(true) およびAttendees カラム。
テンポラリテーブルの使用:
INSERT INTO EventAttendees#TEMP (Code, Type) VALUES ('User', 'USER')
INSERT INTO Events (EventType, StartDateTime, StartTimeZone, IsStartOnly, Attendees) VALUES ('REGULAR', '2020-09-27T14:00:00+09:00', 'Asia/Tokyo', true, 'EventAttendees#TEMP')
INSERT INTO EventFacilities#TEMP (Code) VALUES ('FacilityGroupsFacility1')
INSERT INTO Events (EventType, StartDateTime, StartTimeZone, EndDateTime, EndTimeZone, Facilities) VALUES ('REGULAR', '2020-09-17T14:00:00', 'Asia/Tokyo', '2020-09-17T15:00:00', 'Asia/Tokyo', 'EventFacilities#TEMP')
添付ファイル付きのイベントを挿入します。(添付ファイルのコンテンツにはBase64 エンコードが必要です。)
INSERT INTO EventAttendees#TEMP (Code, Type) VALUES ('Endri', 'USER')
INSERT INTO EventAttachments#TEMP (name, contentType, content) VALUES ('test1.txt', 'plain/text', 'dGVzdA==')
INSERT INTO EventAttachments#TEMP (name, contentType, content) VALUES ('test2.txt', 'plain/text', 'dGVrdrdr33zdA==')
INSERT INTO Events (EventType, StartDateTime, StartTimeZone, isStartOnly, Attendees, Attachments ) VALUES ('REGULAR', '2020-09-27T14:00:00+09:00', 'Asia/Tokyo', true, 'EventAttendees#TEMP', 'EventAttachments#TEMP')
集計の使用:
INSERT INTO Events (EventType, StartDateTime, StartTimeZone, EndDateTime, EndTimeZone, IsStartOnly, Facilities) VALUES ('REGULAR', '2020-09-27T14:00:00', 'Asia/Tokyo', '2020-09-27T15:00:00', 'Asia/Tokyo', false, '[
{
"code": "F001"
}
]')
Delete
イベントのId を指定することでイベントを削除できます。
DELETE FROM Events WHERE Id = 34
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
Composed id of the event. |
| EventId | Int | True |
Id of the event. |
| CreatorId | Int | True |
Id of the creator. |
| CreatorCode | String | True |
Code of the creator. |
| CreatorName | String | True |
Name of the creator. |
| CreatedAt | Datetime | True |
Created time. |
| UpdaterId | Int | True |
Id of the updater. |
| UpdaterCode | String | True |
Code of the updater. |
| UpdaterName | String | True |
Name of the updater. |
| UpdatedAt | Datetime | True |
Updated time. |
| EventType | String | False |
Type of the event. |
| EventMenu | String | False |
Menu of the event. |
| Subject | String | False |
Subject of the event. |
| Notes | String | False |
Notes of the event. |
| VisibilityType | String | False |
Type of visibility. |
| UseAttendanceCheck | Boolean | False |
Use attendance check. |
| Attachments | String | False |
Attachments of the event. |
| Attendees | String | False |
Attendees of the event. |
| AttendeesCandidate | String | True |
Attendees candidate of the event. |
| CompanyInfoName | String | False |
Name of company. |
| CompanyInfoZipCode | String | False |
Zip code of company. |
| CompanyInfoAddress | String | False |
Address of company. |
| CompanyInfoRoute | String | False |
Route of company. |
| CompanyInfoRouteTime | String | False |
Route time of company. |
| CompanyInfoRouteFare | String | False |
Route fare of company. |
| CompanyInfoPhone | String | False |
Phone number of company. |
| StartDateTime | Datetime | False |
Time when event started. |
| StartTimeZone | String | False |
Starting time zone. |
| EndDateTime | Datetime | False |
Time when event ends. |
| EndTimeZone | String | False |
Ending time zone. |
| IsAllDay | Boolean | False |
When set to true, event is all day. |
| IsStartOnly | Boolean | False |
When set to true,event is start only. |
| OriginalStartTimeZone | String | True |
Original start time zone. |
| OriginalEndTimeZone | String | True |
Original end time zone. |
| Watchers | String | False |
Watchers of the event. |
| WatchersCandidate | String | True |
Watchers candidate of the event. |
| Facilities | String | False |
Facilities of the event. |
| FacilitiesCandidate | String | True |
Facilities candidate of the event. |
| FacilityUsingPurpose | String | False |
Facility using purpose |
| FacilityReservationInfo | String | True |
Facility reservation info. |
| FacilityUsageRequests | String | True |
Facility usage requests. |
| RepeatInfo | String | True |
Repeat info. |
| TemporaryEventCandidates | String | True |
Temporary event candidates. |
| RepeatId | String | True |
Repeat id. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるデータを詳細に制御することができます。
| Name | Type | Description |
| DateTime | Datetime |
Specify the date and time of the search target in RFC3339 format. Supported operators are =,<,>,<=,>=. |
| TargetType | String |
Specify the type to narrow down the results by user, organization or facility. 使用できる値は次のとおりです。user, organization, facility |
| Target | String |
Specify the ID to narrow down the results by user Id, organization Id or facility Id. |