Improved Sync - Announcing the Changes Feed in the Documents List API
July 14, 2011
We’re announcing the availability of the Changes feed in the Documents List API. This feed makes it easier to detect resources that have changed.
Currently, clients needing to sync resources between Google Docs and other systems or device often encounter a number of issues detecting changes to resources via the API. Clients typically query for all resources modified after a given date. This date is denoted by the
The Changes feed simplifies this process by providing resource entries only for changed resources. If a resource occurs in the Changes feed at all, the occurrence indicates a change to the resource. Once all changes are consumed, clients can store an identifier of the last change consumed. This identifier is called a changestamp. Future queries to the Changes feed with a changestamp will only return changes occurring after the given changestamp.
To start using the Changes feed, make an authorized HTTP GET request to the following URI:
The response from the API includes a Google Data API feed of resources that have changed:
Fields shown in this example response are discussed in detail in the updated developer guide. Please use the forum for any questions about using the new feed.
Updates to the Java and Python client libraries are on the way, and will be announced in a separate blog post.
Want to weigh in on this topic? Discuss on Buzz
Currently, clients needing to sync resources between Google Docs and other systems or device often encounter a number of issues detecting changes to resources via the API. Clients typically query for all resources modified after a given date. This date is denoted by the
app:edited
field of a resource entry. However, this field is not updated in all cases the client may care about, for instance if a resource is shared. In addition, querying for all resources modified after a given date does not produce entries for resources that have been deleted. This leads to very complex implementations of change detection by clients. These complex implementations usually have race conditions, and require a large volume of data to be exchanged with the API.The Changes feed simplifies this process by providing resource entries only for changed resources. If a resource occurs in the Changes feed at all, the occurrence indicates a change to the resource. Once all changes are consumed, clients can store an identifier of the last change consumed. This identifier is called a changestamp. Future queries to the Changes feed with a changestamp will only return changes occurring after the given changestamp.
To start using the Changes feed, make an authorized HTTP GET request to the following URI:
https://docs.google.com/feeds/default/private/changes
The response from the API includes a Google Data API feed of resources that have changed:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
xmlns:docs="http://schemas.google.com/docs/2007"
xmlns:gd="http://schemas.google.com/g/2005"
gd:etag="W/"DEEMQ3w8eyt7ImA9WhZUGUo."">
<docs:largestChangestamp>5635</docs:largestChangestamp>
<link rel="next" type="application/atom+xml"
href="...?start-index=5636"/>
<entry gd:etag="W/"DUcMRHg5cCt7ImA9WhZUGUo."">
<category scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/docs/2007#change"
label="change"/>
<title>Project tasks</title>
...
<docs:changestamp value="5623"/>
</entry>
...
</feed>
Fields shown in this example response are discussed in detail in the updated developer guide. Please use the forum for any questions about using the new feed.
Updates to the Java and Python client libraries are on the way, and will be announced in a separate blog post.
![]() | Russ Jorgensen LinkedIn Russ Jorgensen joined Google in 2010 and is responsible for supporting and enhancing APIs which third-party applications can use to access and manage users' collections of Google Docs. Prior to working at Google, Russ was an embedded software engineer for 22 years at Bell Labs building telecommunications products such as PBXs and wireless communication systems. |
Want to weigh in on this topic? Discuss on Buzz