Reputation: 33
I am trying to insert a 1 hour recurring event to my calendar via Rest call:
My question is what to put on the UNTIL and end: datetime if I want the event to not have an recurring end datetime?
POST Url:
www.googleapis.com/calendar/v3/calendars/[CalendarId].calendar.google.com/events
Headers:
Authorization: Bearer [Access Token],
Accept: application/json,
Cache-Control: no-cache
Request Body: (JSON)
{
"description":"Awesome event",
"end":{
"dateTime":"**????**",
"timeZone":"America/Chicago"
},
"iCalUID":"e4c76d8b-d32e-414d-9e4e-a22deed4d32f",
"location":"Office",
"recurrence":
["RRULE:FREQ=YEARLY;BYMONTH=6;BYDAY=1WE;UNTIL=**?????**"],
"start":{
"dateTime":"2016-06-22T14:00:00.000Z",
"timeZone":"America/Chicago"
},
"summary":"Get You Stuff Done"
}
Thanks!
Upvotes: 0
Views: 311
Reputation: 33
Okay so I figured out the way that google would like the structure. To insert a 1 hour recurring with out a recurring end date. Use the following structure.
Request Body: (JSON)
{
"description":"Awesome event",
"end":{
"dateTime":**"2016-06-22T15:00:00.000Z",** <-- 1 hour
"timeZone":"America/Chicago"
},
"iCalUID":"e4c76d8b-d32e-414d-9e4e-a22deed4d32f",
"location":"Office",
"recurrence":
["RRULE:FREQ=YEARLY;BYMONTH=6;BYDAY=1WE"], <-- Remove UNTIL
"start":{
"dateTime":"2016-06-22T14:00:00.000Z",
"timeZone":"America/Chicago"
},
"summary":"Get You Stuff Done"
}
Hope this helps someone!
Upvotes: 1