Upon searching my code, it seems I was sending POST vs. PUT for the update. This makes sense now, on retrospect.
The documentation at http://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html#UpdatingListRows does indeed stay to use PUT, however the highlighted URL contains a version number. The feed I obtained does not, however a version number does show up when you enter the https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od6/private/full/cokwr URL from a browser window. Anyways thanks a lot for the help On Dec 8, 2:55 pm, Vic Fryzel <[email protected]> wrote: > Hey Jay, > > So, first I did a GET > against:https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > > And got this: > <?xml version="1.0" encoding="UTF-8"?> > <entry xmlns="http://www.w3.org/2005/Atom" > xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended" > xmlns:gd="http://schemas.google.com/g/2005" > gd:etag=""PRlLE0gSVSt7ImA.""> > <id>https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > </id> > <updated>2010-12-08T22:42:54.362Z</updated> > <app:edited xmlns:app="http://www.w3.org/2007/app > ">2010-12-08T22:42:54.362Z</app:edited> > <category scheme="http://schemas.google.com/spreadsheets/2006" > term="http://schemas.google.com/spreadsheets/2006#list"/> > <title>Aboriginal _Math_Day-Sept_29_10-Large.mov</title> > <content/> > <link rel="self" type="application/atom+xml" > href="https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > "/> > <link rel="edit" type="application/atom+xml" > href="https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > "/> > <gsx:videoname>Aboriginal _Math_Day-Sept_29_10-Large.mov</gsx:videoname> > <gsx:bookingkey/> > <gsx:title/> > <gsx:date/> > <gsx:speaker/> > </entry> > > Then, I took that edit link, and ran a PUT against it: > PUT /feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od6/private/full/cokwr HTTP/1.1 > Host: spreadsheets.google.com > Accept: */* > Authorization: OAuth ... > Content-Type: application/atom+xml > GData-Version: 3.0 > If-Match: * > Content-Length: 490 > > <?xml version="1.0" encoding="UTF-8"?> > <entry xmlns="http://www.w3.org/2005/Atom" > xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended" > xmlns:gd="http://schemas.google.com/g/2005" > gd:etag=""PRlLE0gSVSt7ImA.""> > <id>https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > </id> > <category scheme="http://schemas.google.com/spreadsheets/2006" > term="http://schemas.google.com/spreadsheets/2006#list"/> > <gsx:videoname>Vic was here</gsx:videoname> > </entry> > > HTTP/1.1 200 OK > Content-Type: application/atom+xml; charset=UTF-8; type=entry > GData-Version: 3.0 > ETag: "NQQVChMRWSt7ImA." > Date: Wed, 08 Dec 2010 22:51:58 GMT > Expires: Wed, 08 Dec 2010 22:51:58 GMT > Cache-Control: private, max-age=0 > Transfer-Encoding: chunked > > <?xml version="1.0" encoding="UTF-8"?> > <entry xmlns="http://www.w3.org/2005/Atom" > xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended" > xmlns:gd="http://schemas.google.com/g/2005" > gd:etag=""NQQVChMRWSt7ImA.""> > <id>https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > </id> > <updated>2010-12-08T22:51:58.239Z</updated> > <app:edited xmlns:app="http://www.w3.org/2007/app > ">2010-12-08T22:51:58.239Z</app:edited> > <category scheme="http://schemas.google.com/spreadsheets/2006" > term="http://schemas.google.com/spreadsheets/2006#list"/> > <title>Vic was here</title> > <content/> > <link rel="self" type="application/atom+xml" > href="https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > "/> > <link rel="edit" type="application/atom+xml" > href="https://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > "/> > <gsx:videoname>Vic was here</gsx:videoname> > <gsx:bookingkey/> > <gsx:title/> > <gsx:date/> > <gsx:speaker/> > </entry> > > As you can see, the request succeeded, and my update was applied. I > verified this in the spreadsheet. > > Once you see for yourself, the original data for that cell is in row 121, or > you can undo in the revision history. > > I'm not sure where you were getting that other URL from, but the edit link > for that list entry is > indeedhttps://spreadsheets.google.com/feeds/list/tphY8Xa9MUiq47xaz9_qeVA/od... > . > > Thanks, > -Vic > > > > > > > > On Wed, Dec 8, 2010 at 5:47 PM, Vic Fryzel <[email protected]> wrote: > > Yep, got it. Looking now, thanks. > > > -Vic > > > On Wed, Dec 8, 2010 at 5:47 PM, Jay2.7 <[email protected]> wrote: > > >> Hi Vic, I have shared the sheet with you. > > >> Thanks > > >> On Dec 8, 2:06 pm, Vic Fryzel <[email protected]> wrote: > >> > Hey Jay, > > >> > I just tried this with my own sheet, and could not reproduce. I am > >> indeed > >> > using the edit link from the entry. > > >> > Can you share your sheet with me (if it doesn't contain any sensitive > >> data,) > >> > and I'll try the query against your sheet? > > >> > Thanks, > >> > -Vic > > >> > On Wed, Dec 8, 2010 at 4:29 PM, Jay2.7 <[email protected]> wrote: > >> > > I am using the protocol directly from python to update spreadsheet > >> > > rows, however I cannot edit any rows because the API will not return a > >> > > proper edit url. > > >> > > The bug can be reproduced with the following, which is the equivalent > >> > > of what the python code is calling. > > >> > > $ curl -H "Authorization: GoogleLogin auth=..." \ > >> > > -H "GData-Version: 3.0" \ > > >> > >https://spreadsheets.google.com/feeds/list/0AlW0JurWvXP2dDhSZ3RIMUs1O. > >> .. > > >> > > Note that the URL above is for a spreadsheet row, which returns the > >> > > following > > >> > > <?xml version="1.0" encoding="UTF-8"?> > >> > > <entry xmlns="http://www.w3.org/2005/Atom" xmlns:gsx="http:// > >> > > schemas.google.com/spreadsheets/2006/extended" xmlns:gd="http:// > >> > > schemas.google.com/g/2005" gd:etag=""PRlLE0gSVSt7ImA.""> > >> > > <id>https://spreadsheets.google.com/feeds/list/ > >> > > 0AlW0JurWvXP2dDhSZ3RIMUs1OGtxOU4zZ2I3ZG9BS0E/od6/cokwr</id> > >> > > <updated>2010-12-06T22:36:58.704Z</updated> > >> > > <app:edited xmlns:app="http://www.w3.org/2007/ > >> > > app">2010-12-06T22:36:58.704Z</app:edited> > >> > > <category scheme="http://schemas.google.com/spreadsheets/2006" > >> > > term="http://schemas.google.com/spreadsheets/2006#list"/> > >> > > <title>Some Title</title> > >> > > <content/> > >> > > <link rel="self" type="application/atom+xml" href="https:// > >> > > spreadsheets.google.com/feeds/list/ > >> > > 0AlW0JurWvXP2dDhSZ3RIMUs1OGtxOU4zZ2I3ZG9BS0E/od6/private/full/cokwr"/> > >> > > <link rel="edit" type="application/atom+xml" href="https:// > >> > > spreadsheets.google.com/feeds/list/ > >> > > 0AlW0JurWvXP2dDhSZ3RIMUs1OGtxOU4zZ2I3ZG9BS0E/od6/private/full/cokwr"/> > >> > > <gsx:videoname>Some Title</gsx:videoname> > >> > > <gsx:bookingkey/> > >> > > <gsx:title/> > >> > > <gsx:date/> > >> > > <gsx:speaker/> > >> > > </entry> > > >> > > Notice the edit uri in the <link rel="edit"...> tag does not include a > >> > > version number. As such whenever I attempt to update this row I > >> > > receive the error > > >> > > 400 Bad Request > >> > > Invalid request URI > > >> > > Doing the same request for > > >>https://spreadsheets.google.com/feeds/list/0...E/od6/private/full/cokwr > >> > > from an authenticated browser (Chrome) however returns > > >> > > <?xml version="1.0" encoding="UTF-8"?> > >> > > <entry xmlns="http://www.w3.org/2005/Atom" xmlns:gsx="http:// > >> > > schemas.google.com/spreadsheets/2006/extended"> > >> > > <id>https://spreadsheets.google.com/feeds/list/ > >> > > 0AlW0JurWvXP2dDhSZ3RIMUs1OGtxOU4zZ2I3ZG9BS0E/od6/private/full/cokwr</ > >> > > id> > >> > > <updated>2010-12-06T22:36:58.704Z</updated> > >> > > <category scheme="http://schemas.google.com/spreadsheets/2006" > >> > > term="http://schemas.google.com/spreadsheets/2006#list"/> > >> > > <title type="text">Some Title</title> > >> > > <content type="text"/> > >> > > <link rel="self" type="application/atom+xml" href="https:// > >> > > spreadsheets.google.com/feeds/list/ > >> > > 0AlW0JurWvXP2dDhSZ3RIMUs1OGtxOU4zZ2I3ZG9BS0E/od6/private/full/cokwr"/> > >> > > <link rel="edit" type="application/atom+xml" href="https:// > >> > > spreadsheets.google.com/feeds/list/ > >> > > 0AlW0JurWvXP2dDhSZ3RIMUs1OGtxOU4zZ2I3ZG9BS0E/od6/private/full/cokwr/ > >> > > 1pmphoo"/> > >> > > <gsx:videoname>Some Title</gsx:videoname> > >> > > <gsx:bookingkey/> > >> > > <gsx:title/> > >> > > <gsx:date/> > >> > > <gsx:speaker/> > >> > > </entry> > > >> > > Notice now the <link rel="edit"...> tag *does* include a version > >> > > number, allowing me to successfully update. > > >> > > I guess the first question should be, is this expected behaviour? The > >> > > auth token is generated by authenticating to > >> > >https://www.google.com/accounts/ClientLogin > >> > > under the service "wise". > > >> > > If this is expected, can someone tell me the proper method. If it is > >> > > not expected I am looking for work arounds. > > >> > > Thanks
