PUT/users/{userId}/calendars/{calendarId}/events/{eventId}

指定カレンダーの予定を更新する。

Authorization

oauth2

Access Token を指定します。
指定の方法や Access Token の取得方法は 共通仕様 を参照してください。

Scope

calendar

HTTP Request

PUThttps://www.worksapis.com/v1.0/users/{userId}/calendars/{calendarId}/events/{eventId}

Path Parameters

ParameterTypeDescription
userId string 

ユーザーを特定する ID (URL エンコードする)

  • ユーザーID (userId)
  • ログインID (email)
  • 自身 ("me")

required
example : userf7da-f82c-4284-13e7-030f3b4c756x 
calendarId string 

カレンダー ID


required
example : calendar-96b8-4c74-8277-7953e0b4604a 
eventId string 

予定 ID (URL エンコードする)


required
example : eventr8123-wehuh324-qwejqw123 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

予定および繰返し/繰返し例外予定を配列で入力する。
配列の要素はすべて同じ eventId で入力。

PropertyTypeDescription
eventComponents array (Event) 

予定情報

 
sendNotification boolean 

通知の送信フラグ


default : true
writeOnly : true 

Event

PropertyTypeDescription
eventId string 

予定 ID


required
minLength : 1
maxLength : 255 
summary string 

予定の内容


required
minLength : 0
maxLength : 200 
description string 

予定のメモ


minLength : 0
maxLength : 5000 
location string 

予定の場所


minLength : 0
maxLength : 100 
map object (map) 

地図情報

 
mapUrl object (mapUrl) 

地図 URL

 
categoryId string 

予定のカテゴリー ID

 
start object (start) 

予定の開始または終了日時


required 
end object (end) 

予定の開始または終了日時

 
recurrence array (Recurrence) 

繰返し情報


minItems : 0
maxItems : 100 
recurringEventId string 

繰返し例外予定 ID

  • 参照) https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.4
 
transparency string 

表示方法

  • OPAQUE : 予定あり
  • TRANSPARENT : 空き時間

default : OPAQUE
Allowed values : OPAQUE, TRANSPARENT 
visibility string 

公開/非公開

  • PUBLIC : 公開
  • PRIVATE : 非公開

default : PUBLIC
Allowed values : PUBLIC, PRIVATE 
sequence integer 

シーケンス番号

  • 参照) https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.4

default : 0
minimum : 0
format : int32 
attendees array (Attendee) 

参加者リスト


minItems : 0
maxItems : 500 
videoMeeting object (videoMeeting) 

ビデオ通話ミーティング

 
reminders array (Alarm) 

通知情報


minItems : 0
maxItems : 100 
priority integer 

予定の重要度 0 : 重要度の指定なし 1 : 最も重要 2 : 次に重要 .... 9 : 最も低い重要度


default : 0
minimum : 0
maximum : 9 

map

PropertyTypeDescription
type string 

地図タイプ(google など)

 
geo string 

経緯度

 

mapUrl

PropertyTypeDescription
mapUrl string 

地図の URL

 
imageId string 

地図の画像 ID

 

start

PropertyTypeDescription
date string 

終日予定の場合の日付 (YYYY-MM-DD)

  • start.date は予定期間に含み、end.date は予定期間に含まない。
 
dateTime string 

時間予定の場合の日時 (YYYY-MM-DDTHH:mm:ss)

 
timeZone string 

時間予定 (dateTime) の場合の タイムゾーン

 

end

PropertyTypeDescription
date string 

終日予定の場合の日付 (YYYY-MM-DD)

  • start.date は予定期間に含み、end.date は予定期間に含まない。
 
dateTime string 

時間予定の場合の日時 (YYYY-MM-DDTHH:mm:ss)

 
timeZone string 

時間予定 (dateTime) の場合の タイムゾーン

 

Recurrence

PropertyTypeDescription
Recurrence string 

繰返し予定のルールを設定

  • 参照)
  • EXDATE: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.1
  • RRULE: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10
    例) 毎週木曜日の繰り返し
    RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TH
 

Attendee

PropertyTypeDescription
id string 

設備ID
設備を指定する場合は必須

設備から設備 ID を取得する API は用意されていない
設備を予約した予定を取得することで設備 ID を取得できる

 
email string 

参加者メールアドレス
参加者を指定する場合は必須

 
displayName string 

参加者または設備名

 
partstat string 

予定招待への回答

  • NEEDS-ACTION : 未回答
  • ACCEPTED : 承諾
  • DECLINED : 辞退
  • TENTATIVE : 未定

Allowed values : NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE 
isResource boolean 

設備フラグ


default : false 
isOptional boolean 

任意参加フラグ


default : false 
resourceValue string 

リソースの固有値

 

videoMeeting

PropertyTypeDescription
url string 

ビデオ通話ミーティング URL


format : uri 
resourceId string 

ビデオ通話ミーティング ID

 

Alarm

PropertyTypeDescription
method string 

通知方法

  • DISPLAY : プッシュ通知
  • EMAIL : メール通知

required
Allowed values : DISPLAY, EMAIL 
trigger string 

予定開始前の通知タイミング
詳細は こちら を参照
例)
-PT0S : イベント予定時刻
-PT15M : 15 分前
-PT12H : 12 時間前
-P1D : 1 日前
-P1W : 1 週間前
-P6DT12H : 6 日 12 時間前

 
triggerDateTime object (triggerDateTime) 

時間情報

 

triggerDateTime

PropertyTypeDescription
dateTime string 

日時 (YYYY-MM-DDTHH:mm:ss)

 
timeZone string 

タイムゾーン

 

Request Example

example

1{2  "eventComponents": [3    {4      "eventId": "eventr8123-wehuh324-qwejqw123",5      "summary": "Meeting",6      "description": "Memo",7      "location": "CUNY Graduate Center",8      "map": {9        "type": "google",10        "geo": "40.7486484;-73.98400699999999"11      },12      "mapUrl": {13        "mapUrl": "https://mapUrl.googlemap.com",14        "imageId": "imageId123"15      },16      "categoryId": "1",17      "start": {18        "dateTime": "2021-12-13T14:00:00",19        "timeZone": "Asia/Tokyo"20      },21      "end": {22        "dateTime": "2021-12-13T15:00:00",23        "timeZone": "Asia/Tokyo"24      },25      "recurrence": [26        "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=SU",27        "EXDATE;TZID=Asia/Tokyo:20211213T140000"28      ],29      "recurringEventId": "TZID=Asia/Tokyo:20211213T140000",30      "transparency": "OPAQUE",31      "visibility": "PUBLIC",32      "sequence": 1,33      "attendees": [34        {35          "email": "attendee1@example.com",36          "displayName": "user1",37          "partstat": "NEEDS-ACTION",38          "isOptional": false,39          "isResource": false40        },41        {42          "email": "attendee2@example.com",43          "displayName": "user2",44          "partstat": "ACCEPTED",45          "isOptional": true,46          "isResource": false47        },48        {49          "id": "10000355/10029600@97d9ddb4-ae93-4469-8471-110c573d13z1",50          "partstat": "ACCEPTED",51          "resourceValue": "https://calendar.worksmobile.com/resources/resource/10000355/10029600@97d9ddb4-ae93-4469-8471-110c573d13z1",52          "isOptional": false,53          "isResource": true54        },55        {56          "email": "attendee3@example.com",57          "displayName": "user3",58          "partstat": "DECLINED",59          "isOptional": false,60          "isResource": false61        }62      ],63      "videoMeeting": {64        "url": "https://works.do/x4gOs1_call",65        "resourceId": "x4gOs1_call"66      },67      "reminders": [68        {69          "method": "DISPLAY",70          "trigger": "-PT10M"71        },72        {73          "method": "EMAIL",74          "triggerDateTime": {75            "dateTime": "2021-12-13T10:00:00",76            "timeZone": "Asia/Tokyo"77          }78        }79      ],80      "priority": 081    }82  ],83  "sendNotification": false84}

Response

HTTP 200

OK

PropertyTypeDescription
eventComponents array (Event) 

予定情報

 
organizerCalendarId string 

イベントが属しているカレンダー ID

 

Event

PropertyTypeDescription
eventId string 

予定 ID


required
minLength : 1
maxLength : 255 
createdTime object (createdTime) 

時間情報


readOnly : true 
updatedTime object (updatedTime) 

時間情報


readOnly : true 
summary string 

予定の内容


required
minLength : 0
maxLength : 200 
description string 

予定のメモ


minLength : 0
maxLength : 5000 
location string 

予定の場所


minLength : 0
maxLength : 100 
map object (map) 

地図情報

 
mapUrl object (mapUrl) 

地図 URL

 
categoryId string 

予定のカテゴリー ID

 
organizer object (organizer) 

主催者
予定が属するカレンダーを示す。

  • 基本カレンダー: 基本カレンダーのマスターのログイン ID
  • 基本カレンダー以外: カレンダー固有のカレンダーのメールアドレス

readOnly : true 
start object (start) 

予定の開始または終了日時


required 
end object (end) 

予定の開始または終了日時

 
recurrence array (Recurrence) 

繰返し情報


minItems : 0
maxItems : 100 
recurringEventId string 

繰返し例外予定 ID

  • 参照) https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.4.4
 
transparency string 

表示方法

  • OPAQUE : 予定あり
  • TRANSPARENT : 空き時間

default : OPAQUE
Allowed values : OPAQUE, TRANSPARENT 
visibility string 

公開/非公開

  • PUBLIC : 公開
  • PRIVATE : 非公開

default : PUBLIC
Allowed values : PUBLIC, PRIVATE 
sequence integer 

シーケンス番号

  • 参照) https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.4

default : 0
minimum : 0
format : int32 
attendees array (Attendee) 

参加者リスト


minItems : 0
maxItems : 500 
videoMeeting object (videoMeeting) 

ビデオ通話ミーティング

 
reminders array (Alarm) 

通知情報


minItems : 0
maxItems : 100 
attachments array (File) 

添付ファイル(添付ファイルのサイズの合計が 100MB 以下)


readOnly : true 
viewUrl string 

予定情報の参照 URL


minLength : 0
format : uri
readOnly : true 
priority integer 

予定の重要度 0 : 重要度の指定なし 1 : 最も重要 2 : 次に重要 .... 9 : 最も低い重要度


default : 0
minimum : 0
maximum : 9 

createdTime

PropertyTypeDescription
dateTime string 

日時 (YYYY-MM-DDTHH:mm:ss)

 
timeZone string 

タイムゾーン

 

updatedTime

PropertyTypeDescription
dateTime string 

日時 (YYYY-MM-DDTHH:mm:ss)

 
timeZone string 

タイムゾーン

 

map

PropertyTypeDescription
type string 

地図タイプ(google など)

 
geo string 

経緯度

 

mapUrl

PropertyTypeDescription
mapUrl string 

地図の URL

 
imageId string 

地図の画像 ID

 

organizer

PropertyTypeDescription
email string 

主催者のメールアドレス


required 
displayName string 

主催者名

 

start

PropertyTypeDescription
date string 

終日予定の場合の日付 (YYYY-MM-DD)

  • start.date は予定期間に含み、end.date は予定期間に含まない。
 
dateTime string 

時間予定の場合の日時 (YYYY-MM-DDTHH:mm:ss)

 
timeZone string 

時間予定 (dateTime) の場合の タイムゾーン

 

end

PropertyTypeDescription
date string 

終日予定の場合の日付 (YYYY-MM-DD)

  • start.date は予定期間に含み、end.date は予定期間に含まない。
 
dateTime string 

時間予定の場合の日時 (YYYY-MM-DDTHH:mm:ss)

 
timeZone string 

時間予定 (dateTime) の場合の タイムゾーン

 

Recurrence

PropertyTypeDescription
Recurrence string 

繰返し予定のルールを設定

  • 参照)
  • EXDATE: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.5.1
  • RRULE: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10
    例) 毎週木曜日の繰り返し
    RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TH
 

Attendee

PropertyTypeDescription
id string 

設備ID
設備を指定する場合は必須

設備から設備 ID を取得する API は用意されていない
設備を予約した予定を取得することで設備 ID を取得できる

 
email string 

参加者メールアドレス
参加者を指定する場合は必須

 
displayName string 

参加者または設備名

 
partstat string 

予定招待への回答

  • NEEDS-ACTION : 未回答
  • ACCEPTED : 承諾
  • DECLINED : 辞退
  • TENTATIVE : 未定

Allowed values : NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE 
isResource boolean 

設備フラグ


default : false 
isOptional boolean 

任意参加フラグ


default : false 
resourceValue string 

リソースの固有値

 

videoMeeting

PropertyTypeDescription
url string 

ビデオ通話ミーティング URL


format : uri 
resourceId string 

ビデオ通話ミーティング ID

 

Alarm

PropertyTypeDescription
method string 

通知方法

  • DISPLAY : プッシュ通知
  • EMAIL : メール通知

required
Allowed values : DISPLAY, EMAIL 
trigger string 

予定開始前の通知タイミング
詳細は こちら を参照
例)
-PT0S : イベント予定時刻
-PT15M : 15 分前
-PT12H : 12 時間前
-P1D : 1 日前
-P1W : 1 週間前
-P6DT12H : 6 日 12 時間前

 
triggerDateTime object (triggerDateTime) 

時間情報

 

triggerDateTime

PropertyTypeDescription
dateTime string 

日時 (YYYY-MM-DDTHH:mm:ss)

 
timeZone string 

タイムゾーン

 

File

PropertyTypeDescription
fileUrl string 

ファイル URL


readOnly : true 
fileName string 

ファイル名


readOnly : true 
fileSize integer 

ファイルサイズ


minimum : 0
format : int64
readOnly : true 

Response Example

example

1{2  "eventComponents": [3    {4      "eventId": "eventr8123-wehuh324-qwejqw123",5      "createdTime": {6        "dateTime": "2021-12-12T22:44:59",7        "timeZone": "Asia/Tokyo"8      },9      "updatedTime": {10        "dateTime": "2021-12-14T21:01:31",11        "timeZone": "Asia/Tokyo"12      },13      "summary": "Meeting",14      "description": "Memo",15      "location": "CUNY Graduate Center",16      "map": {17        "type": "google",18        "geo": "40.7486484;-73.98400699999999"19      },20      "mapUrl": {21        "mapUrl": "https://mapUrl.googlemap.com",22        "imageId": "imageId123"23      },24      "categoryId": "1",25      "organizer": {26        "email": "user1@example.com",27        "displayName": "ワークス 太郎"28      },29      "start": {30        "dateTime": "2021-12-13T14:00:00",31        "timeZone": "Asia/Tokyo"32      },33      "end": {34        "dateTime": "2021-12-13T15:00:00",35        "timeZone": "Asia/Tokyo"36      },37      "transparency": "OPAQUE",38      "visibility": "PUBLIC",39      "sequence": 1,40      "attendees": [41        {42          "email": "attendee1@example.com",43          "displayName": "user1",44          "partstat": "NEEDS-ACTION",45          "isOptional": false,46          "isResource": false47        },48        {49          "email": "attendee2@example.com",50          "displayName": "user2",51          "partstat": "ACCEPTED",52          "isOptional": true,53          "isResource": false54        },55        {56          "id": "10000355/10029600@97d9ddb4-ae93-4469-8471-110c573d13z1",57          "partstat": "ACCEPTED",58          "resourceValue": "https://calendar.worksmobile.com/resources/resource/10000355/10029600@97d9ddb4-ae93-4469-8471-110c573d13z1",59          "isOptional": false,60          "isResource": true61        },62        {63          "email": "attendee3@example.com",64          "displayName": "user3",65          "partstat": "DECLINED",66          "isOptional": false,67          "isResource": false68        }69      ],70      "videoMeeting": {71        "url": "https://works.do/x4gOs1_call",72        "resourceId": "x4gOs1_call"73      },74      "reminders": [75        {76          "method": "DISPLAY",77          "trigger": "-PT10M"78        },79        {80          "method": "EMAIL",81          "triggerDateTime": {82            "dateTime": "2021-12-13T10:00:00",83            "timeZone": "Asia/Tokyo"84          }85        }86      ],87      "attachments": [88        {89          "fileUrl": "https://calendar.worksmobile.com/file/download?scheduleId=20211212T134459Z-153@zvcweb06.wcal.nfra.io&path=21785b23-760z-4394-badf-6463c9474746.10029600",90          "fileName": "4024939274.pdf",91          "fileSize": 4850692        }93      ],94      "viewUrl": "https://calendar.worksmobile.com/permanentLink.nhn",95      "priority": 096    }97  ],98  "organizerCalendarId": "calendar-96b8-4c74-8277-7953e0b4604a"99}

HTTP 400

Bad Request

HTTP 403

Forbidden

HTTP 404

Not Found