Every resource has a version field that changes every time the resourcechanges — the etag
field. Etags are a standard part of HTTP and aresupported in the calendar API for two cases:
The new Google Calendar app helps you spend less time managing your schedule and more time enjoying it. Calendar Pro for Google is a Google calendar app with intuitive design. Now, it's so easy to get every event organized. It has a simple and neat look and is accessible, highly responsive and reliable.
Google Calendar Pro
- on resource modifications to ensure that there has been no other write to this resource in the meantime (conditional modification)
- on resource retrieval to only retrieve resource data if the resource has changed (conditional retrieval)
Conditional modification
If you want to update or delete a resource only if it has not changed sinceyou last retrieved it, you can specify an If-Match
header that contains thevalue of the etag from the previous retrieval. This is very useful to preventlost modifications on resources. The clients have the option of re-retrievingthe resource and re-applying the changes.
Calendarpro For Google 3 0 4 – Google Calendar Application Form
If the entry (and its etag) has not changed since the last retrieval, themodification succeeds and the new version of the resource with the new etag isreturned. Otherwise, you will get a 412 (Precondition failed) response code.
Calendarpro For Google 3 0 4 – Google Calendar Application Download
Important: There is no support for conditional modifications for insertoperations. Instead, it is guaranteed that if you are allowed to provide aresource ID, then the operation will only succeed if no existing entry hasthat ID.The snippet of sample code below demonstrates how to perform conditionalmodifications with theJava client library.
Calendarpro For Google 3 0 4 – Google Calendar Applications
Conditional retrieval
If you want to retrieve a resource only if it has changed since you lastretrieved it, you can specify an If-None-Match
header which contains thevalue of the etag from the previous retrieval. If the entry (and thus its etag)has changed since the last retrieval, the new version of the resource with thenew etag will be returned. Otherwise you will get a 304 (Not Modified)response code.
calendarList
entry changes (e.g., calendarproperties or ACLs).Calendarpro For Google 3 0 4 – Google Calendar Application Online
The snippet of sample code below demonstrates how to perform conditionalretrieval with theJava client library.