Eric, Thanks for your answer.
Looks like something has been broken lately in the API, since when I posted my original message on November 28th, sending only metadata with a POST request to create a spreadsheet document was working as expected and as documented in the reference guide (I was getting a "201 Created" response). The operation that failed was uploading contents afterwards using a PUT request (returning a "400 Bad request" and "Could not convert document" status). Thus, I hope that when Google will have repaired what was once working, the actual problem I have reported two weeks ago will be either looked at and addressed, or you'll be able to point out what is wrong in my PUT request and what I should send so that the API accepts my data. Thanks in advance, Stéphane On 13 déc, 01:05, "Eric (Google)" <[email protected]> wrote: > Hi Stephane, > > I tested uploading your spreadsheet file. This is a bug that's been > filed:http://code.google.com/p/gdata-issues/issues/detail?id=929 > > Note, a 503 is returned, but the the spreadsheet _was_ created for me. > > Eric > > On Dec 8, 12:26 am, sdevouard <[email protected]> wrote: > > > Hi Eric, > > > Thanks for your answer. > > My initial question was about updating a spreadsheet's content through > > the API using the HTTP PUT request as described in the programmer's > > guide and reference doc. > > In my original post, I enclosed a trace debug of the raw HTTP request > > I'm sending and the answer I get from Google. It is returning a status > > 400 and telling me that it could not convert the document. That's why > > I mentioned I tried to upload the data from the UI using the exact > > same .csv content, and it worked. But I want to have it working via > > the API. > > > After clarifying this, if you still want me to send you the data as > > a .csv doc so that you can try yourself, please let me know. But I'm > > afraid it won't resolve my problem as I want it to work from inside my > > application using the low-level API (raw HTTP requests/answers), and > > although what I'm sending *seems* to be correct, I am probably missing > > something that is needed. > > > Thanks again, > > Stéphane > > > On 5 déc, 18:30, "Eric (Google)" <[email protected]> wrote: > > > > Hi Stephane, > > > > Sorry for the late reply. Do you mind sending me that .csv file > > > so I can test it out. > > > > Eric > > > > On Dec 3, 7:42 am, sdevouard <[email protected]> wrote: > > > > > Anyone ? > > > > > TIA, > > > > Stéphane > > > > > On 28 nov, 10:16, sdevouard <[email protected]> wrote: > > > > > > Hi, > > > > > > I'm using the Google Spreadsheet API to create spreadsheets on Google > > > > > Docs from my application. > > > > > Since I'm not using any of the languages for which Google provides a > > > > > set of client classes, I'm using the low-level interface sending HTTP > > > > > requests and parsing the Atom responses. > > > > > My HTTP client routine does not allow for multi-parts content, thus to > > > > > create the spreadsheet, I first send a POST request with only > > > > > metadata, retrieve the edit-media link HREF from the response, then > > > > > PUT the actual file content to this URL. > > > > > The Google API answers with a 400 Bad Request status & "Could not > > > > > convert document" error message to my PUT request, and I'm at a loss > > > > > to determine what's wrong with it. > > > > > Below is a trace debug output of what I send to and what I receive > > > > > from Google : > > > > > > open> [tcp]docs.google.com;80;STREAM > > > > > send> PUT /feeds/media/private/full/ > > > > > spreadsheet:p3HB92QDh9kqpgmZuITdBLw HTTP/1.1 > > > > > send> Host: docs.google.com:80 > > > > > send> From: rdpad...@ftp2 > > > > > send> User-Agent: ProvideX HTTP Agent > > > > > send> Content-Type: text/csv; charset=us-ascii > > > > > send> Content-Length: 11046 > > > > > send> Authorization: GoogleLogin > > > > > auth=DQAAAHsAAADW2Av0QZeG5bHJkM5828eMtdRLywuq28dItoSrPP9TwLksnEhcwk6vAwosZVudULwQ3S9I5sEE9PfiPh4Ig4rR30zq3n92TviKjHz4igmkkVLs1ofy-6S1L9QSA6lmTZTJ9GuL9zGIfjuPjcidlOca87KvfC- > > > > > vfvPWtJj3RA_6gA > > > > > send> GData-Version: 2 > > > > > send> If-Match: * > > > > > send> Connection: close > > > > > send> > > > > > send> "Invoice","Job/Memo","Date","DueWk","Stat","Amount","HB/Pay/ > > > > > Adjs","Amount Due" > > > > > send> "HR-R100007","","2008/06/21","0838","",-41.25,0,-41.25 > > > > > send> "HR-R100007 R","","2008/06/21","0838","",41.25,0,41.25 > > > > > send> "HR-R100014","","2008/06/28","0838","",-83.51,0,-83.51 > > > > > send> "HR-R300159","","2008/03/25","0824","",-19.8,19.8,0 > > > > > send> "SP-R000004","","2008/05/15","0833","",-358.32,0,-358.32 > > > > > send> "SP-R000006","","2008/06/15","0838","",-358.32,0,-358.32 > > > > > send> "HR-u100008","","2008/06/19","0838","",-162,0,-162 > > > > > send> "HR-u100014","","2008/06/28","0838","",-264.44,0,-264.44 > > > > > send> "HR-u300154","","2008/03/25","0824","",-2201.04,0,-2201.04 > > > > > send> "HR-u800005","","2008/06/19","0838","",-72.99,0,-72.99 > > > > > send> "SP-t000004","","2008/05/15","0833","",-108,0,-108 > > > > > send> "SP-t000006","","2008/06/15","0838","",-108,0,-108 > > > > > send> "HR-t100007","","2008/06/21","0838","",-10.78,0,-10.78 > > > > > send> "HR-t100007 R","","2008/06/21","0838","",10.78,0,10.78 > > > > > send> "HR-u100009","","2008/06/20","0838","",0,0,0 > > > > > send> "AB-1100151","","2008/01/01","0816","",-286.74,0,-286.74 > > > > > send> "AB-1200151","","2008/01/01","0816","",-286.74,0,-286.74 > > > > > send> "AB-1300151","","2008/01/01","0816","",-286.74,0,-286.74 > > > > > send> "AB-1400151","","2008/01/01","0816","",-286.74,0,-286.74 > > > > > send> "AB-1500151","","2008/01/01","0816","",-286.74,0,-286.74 > > > > > send> "HR-M100007","","2008/06/21","0838","",-20.34,0,-20.34 > > > > > send> "HR-M100007 R","","2008/06/21","0838","",20.34,0,20.34 > > > > > send> "HR-M100014","","2008/06/28","0838","",-42.6,0,-42.6 > > > > > send> "HR-M300151","","2008/01/01","0816","",-286.74,0,-286.74 > > > > > send> "HR-M300153","","2008/01/03","0816","",-95.58,0,-95.58 > > > > > send> "HR-M300154","","2008/03/25","0824","",-379.84,0,-379.84 > > > > > send> "HR-M300156","","2008/03/25","0824","",-131.42,0,-131.42 > > > > > send> "HR-M300157","","2008/03/25","0824","",-60.9,0,-60.9 > > > > > send> "HR-M300158","","2008/03/25","0824","",-28.92,0,-28.92 > > > > > send> "HR-M300159","","2008/03/25","0824","",-14.36,0,-14.36 > > > > > send> "HR-S100007","","2008/06/21","0838","",-86.96,0,-86.96 > > > > > send> "HR-S100007 R","","2008/06/21","0838","",86.96,0,86.96 > > > > > send> "HR-S100014","","2008/06/28","0838","",-182.16,0,-182.16 > > > > > send> "HR-S300151","","2008/01/01","0816","",-1226.1,0,-1226.1 > > > > > send> "HR-S300153","","2008/01/03","0816","",-408.7,0,-408.7 > > > > > send> "HR-S300154","","2008/03/25","0824","",-1624.16,0,-1624.16 > > > > > send> "HR-S300156","","2008/03/25","0824","",-561.96,0,-561.96 > > > > > send> "HR-S300157","","2008/03/25","0824","",-260.4,0,-260.4 > > > > > send> "HR-S300158","","2008/03/25","0824","",-123.7,0,-123.7 > > > > > send> "HR-S300159","","2008/03/25","0824","",-61.38,0,-61.38 > > > > > send> "HR-T100007","","2008/06/21","0838","",-65.87,0,-65.87 > > > > > send> "HR-T100007 R","","2008/06/21","0838","",65.87,0,65.87 > > > > > send> "HR-T100014","","2008/06/28","0838","",-273.05,0,-273.05 > > > > > send> "HR-T300151","","2008/01/01","0816","",-2690.26,0,-2690.26 > > > > > send> "HR-T300153","","2008/01/03","0816","",-801.29,0,-801.29 > > > > > send> "HR-T300154","","2008/03/25","0824","",-3930.62,0,-3930.62 > > > > > send> "HR-T300156","","2008/03/25","0824","",-1209.17,0,-1209.17 > > > > > send> "HR-T300157","","2008/03/25","0824","",-424.02,0,-424.02 > > > > > send> "HR-T300158","","2008/03/25","0824","",-135.42,0,-135.42 > > > > > send> "HR-T300159","","2008/03/25","0824","",-37.08,0,-37.08 > > > > > send> "HR-U100007","","2008/06/21","0838","",-5.61,0,-5.61 > > > > > send> "HR-U100007 R","","2008/06/21","0838","",5.61,0,5.61 > > > > > send> "HR-U100008","","2008/06/19","0838","",-14.4,0,-14.4 > > > > > send> "HR-U100009","","2008/06/20","0838","",-6,0,-6 > > > > > send> "HR-U100014","","2008/06/28","0838","",-11.75,0,-11.75 > > > > > send> "HR-U300151","","2008/01/01","0816","",-79.1,0,-79.1 > > > > > send> "HR-U300153","","2008/01/03","0816","",-3.26,0,-3.26 > > > > > send> "HR-U300154","","2008/03/25","0824","",-9.2,0,-9.2 > > > > > send> "HR-U300157","","2008/03/25","0824","",-16.8,0,-16.8 > > > > > send> "HR-U300158","","2008/03/25","0824","",-7.98,0,-7.98 > > > > > send> "HR-U300159","","2008/03/25","0824","",-3.96,0,-3.96 > > > > > send> "HR-U800005","","2008/06/19","0838","",-6.49,0,-6.49 > > > > > send> "SP-M000004","","2008/05/15","0833","",-173.2,0,-173.2 > > > > > send> "SP-M000006","","2008/06/15","0838","",-173.2,0,-173.2 > > > > > send> "SP-S000004","","2008/05/15","0833","",-740.52,0,-740.52 > > > > > send> "SP-S000006","","2008/06/15","0838","",-740.52,0,-740.52 > > > > > send> "SP-T000004","","2008/05/15","0833","",-891.11,0,-891.11 > > > > > send> "SP-T000006","","2008/06/15","0838","",-891.11,0,-891.11 > > > > > send> "SP-U000004","","2008/05/15","0833","",-47.78,0,-47.78 > > > > > send> "SP-U000006","","2008/06/15","0838","",-47.78,0,-47.78 > > > > > send> "5","","2007/04/01","0728","",-2000,0,-2000 > > > > > send> "5CR","","2007/04/01","0728","",2000,0,2000 > > > > > send> "6","","2007/04/01","0728","",-2000,0,-2000 > > > > > send> "6CR","","2007/04/01","0728","",2000,0,2000 > > > > > send> "1","","2007/04/01","0728","",-1315,0,-1315 > > > > > send> "11","","2007/04/23","0728","",-1315,1315,0 > > > > > send> "12","","2007/04/24","0728","",-1315,1315,0 > > > > > send> "1CR","","2007/04/01","0728","",1315,0,1315 > > > > > send> "2","","2007/04/01","0728","",-1200,0,-1200 > > > > > send> "2CR","","2007/04/01","0728","",1200,0,1200 > > > > > send> "3","","2007/04/01","0728","",-1315,0,-1315 > > > > > send> "3CR","","2007/04/01","0728","",1315,0,1315 > > > > > send> "4","","2007/04/01","0728","",-1200,0,-1200 > > > > > send> "4CR","","2007/04/01","0728","",1200,0,1200 > > > > > send> "SYL1","","2007/04/01","0728","",-1315,0,-1315 > > > > > send> "SYL1CR","","2007/04/01","0728","",1315,0,1315 > > > > > send> "SYL2","","2007/04/01","0728","",-1315,0,-1315 > > > > > send> "SYL2CR","","2007/04/01","0728","",1315,0,1315 > > > > > send> "34-34-55","test1","2008/06/23","30838","",-77,0,-77 > > > > > send> "34-99-22","Test 99","2008/06/23","30838","",-44,0,-44 > > > > > send> "43829","","2008/02/22","30820","",-2222,0,-2222 > > > > > send> "56373","TESAD","2008/03/13","30824","",55,0,55 > > > > > send> "67-890","0000094","2008/01/23","30816","",-345,0,-345 > > > > > send> "737","01-0001","2007/05/11","30733","",-1000,0,-1000 > > > > > send> "739","01-0001 0000505","2007/05/11","30733","",-1040,0,-1040 > > ... > > plus de détails » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Docs Data APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Docs-Data-APIs?hl=en -~----------~----~----~----~------~----~------~--~---
