I need to update an existing attachment on a site using the java client library. I was using updateMedia() of SitesService successfully until a few days back when it started to fail when sites api was updated to v1.1(I took the new jars); I get the following exception:
com.google.gdata.util.InvalidEntryException: Bad Request Invalid parent link: https://sites.google.com/feeds/content/[domain-name]/[site-name]/[parent-id]?xoauth_requestor_id=[user-name]
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:558)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:536)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:515)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
at com.google.gdata.client.media.MediaService.updateMedia(MediaService.java:523)
I can't figure out why this has started to fail all of a sudden. Other api requests like retrieving sites feed, retrieving existing entry, inserting new entry are all working.
And I'm using 2-legged oauth for authentication on an apps premier domain.