"Also, when you do a PUT, you might also send an If-Match header, as per the advice here http://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html#UpdatingListRows (even though the same document does not call out the need to do this for the cell feed ... it's not a high-fidelity document)."
Wow, nice catch David. This should get added to the Working with Cell-based Feeds documentation. Thanks for solving my issue with making a cell feed PUT request. I was geting a 403 (Forbidden) error, "If-Match or If-None-Match header or entry etag attribute required". Just in case anyone else is looking for this: "To make sure that your update doesn't overwrite another client's changes, include an HTTPIf-Match header that contains the original row's ETag value. You can determine the original row's ETag value by examining the <entry> element's gd:etag attribute. If you want to update the row regardless of whether someone else has updated it since you retrieved it, then use If-Match: * and don't include the ETag. For more information about ETags, see the Google Data APIs reference guide<http://code.google.com/apis/gdata/reference.html#ResourceVersioning> ." In my code it looks like this: var params = { 'method': 'PUT', 'headers': { 'GData-Version': '3.0', 'Content-Type': 'application/atom+xml', *'If-Match': '*'* }, 'body': constructCellAtomXml_(r,c,missingTitle) }; On Thursday, August 18, 2011 6:45:25 AM UTC-7, David Bullock wrote: > > You don't get some text with your 400 error to give you a hint? > > What is most likely to be wrong here is that you're not PUTing to the > <link rel="edit' href='useme' /> from the cell's <entry/> when you GET the > cell feed. The URL you are looking for has an extra part after the R2C4 > bit. > > You'll also want to be sending GData-Version and Authorization headers, of > course. > > Also, when you do a PUT, you might also send an If-Match header, as per > the advice here > http://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html#UpdatingListRows > (even > though the same document does not call out the need to do this for the cell > feed ... it's not a high-fidelity document). > > > On Thu, Aug 18, 2011 at 10:25 PM, Yuval Yogev wrote: > >> $.ajax({ >> >> type:'PUT', >> >> url:' >> https://spreadsheets.google.com/feeds/cells/0Ah_jky4S-P9bdGtyUFpfd1N0ZFIxWTc2ek9FNU84Qmc/od6/private/full/R2C4 >> ', >> >> data:'<entry xmlns="http://www.w3.org/2005/Atom >> "xmlns:gs="http://schemas.google.com/spreadsheets/2006"><id> >> https://spreadsheets.google.com/feeds/cells/0Ah_jky4S-P9bdGtyUFpfd1N0ZFIxWTc2ek9FNU84Qmc/od6/private/full/R2C4</id><link >> >> rel="edit" type="application/atom+xml"href=" >> https://spreadsheets.google.com/feeds/cells/0Ah_jky4S-P9bdGtyUFpfd1N0ZFIxWTc2ek9FNU84Qmc/od6/private/full/R2C4"/><gs:cell >> >> row="2" col="4" inputValue="300"/></entry>', >> >> contentType:"application/atom+xml", >> >> success:function(data){ >> >> alert('success'); >> >> } >> >> }); >> >> Can anyone help? >> > >
