Important: This is an old version of this page. For the latest version, use the links in the left-side navbar.
This guide explains what you need to do to migrate your existing client applications from version 1 to version 2 of the Contacts Data API.
This guide contains information specific to the Contacts Data API. For more general information about migrating Data API clients, see the Google Data APIs Migration Guide.
This guide is intended for developers who have written a client under version 1 of the Contacts Data API and want to update it to work with version 2.
If you haven't written a client under version 1, then you can ignore this guide; just read the regular version 2 developer's guide.
To update your version 1 client to version 2, here's what you need to do:
To update your Java client:
ContactsService.delete to delete entries, change it to use ContactEntry.delete instead.To update your client if you used the raw protocol:
GData-Version: 2) to every HTTP request you send. Alternatively, add a query parameter (v=2) to the URL of every request.v=2 query parameter to the URI). The server returns the version 2 representation of the entry, including the new URIs, which you can store in place of the old ones.app) has been changed from http://purl.org/atom/app to http://www.w3.org/2007/app.openSearch) has been changed from http://a9.com/-/spec/opensearchrss/1.0/ to http://a9.com/-/spec/opensearch/1.1/.edit-photo links from version 1 no longer exist in version 2. Instead, use the photo link (with rel value of http://schemas.google.com/contacts/2008/rel#photo), which is now always present. If a photo exists, then it has a gd:etag attribute; to update or delete the photo, pass the ETag in the If-Match header. For details, see Contact photo management in the Developer's Guide.409 Conflict status code if you try to create a new contact with the same email address as another contact. Thus, if your client relies on this behavior, you may need to change your client to check for existing contacts with the given address before creating a new one.updated-min query parameter. This provides your client with ETags and the new photo links, as well as indicating which contacts belong to which system groups. If you don't do a full synchronization, then the server won't tell you that the contacts have been put in system groups, because from the server's point of view, the contacts haven't changed.<gContact:groupMembershipInfo> element to the contact.