Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>While <a href="http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#UploadingDocs" rel="noreferrer">the docs</a> call it "uploading", everything boils down to sending an appropriately formatted <code>HTTP POST</code> request, so <em>of course</em> it can actually be a new creation rather than an actual "upload" of an otherwise existing file. (Creation through <code>POST</code> requests is similar to what's normally described as a <code>REST API</code>, though in real <code>REST</code> you'd typically use a <code>PUT</code> request instead of course).</p> <p>You just need to create a blob of data representing your document in any of the formats listed <a href="http://code.google.com/apis/documents/faq.html#WhatKindOfFilesCanIUpload" rel="noreferrer">here</a> -- depending on your programming language, simplest may be <code>text/csv</code> for a spreadsheet and <code>application/rtf</code> for a text-document -- then put in in an appropriately formatted <code>POST</code> data. For example, to make a spreadsheet in the simplest way (no metadata), you could <code>POST</code> something like:</p> <pre><code>POST /feeds/default/private/full HTTP/1.1 Host: docs.google.com GData-Version: 3.0 Authorization: &lt;your authorization header here&gt; Content-Length: 81047 Content-Type: text/csv Slug: Example Spreadsheet ColumnA, ColumnB 23, 45 </code></pre> <p>Each specific programming language for which a dedicated API is supplied may offer help with this not-so-hard task; for example, in Python, per <a href="http://code.google.com/apis/documents/docs/3.0/developers_guide_python.html#UpdatingDocs" rel="noreferrer">the docs</a>, the API recommends using <code>ETags</code> to avoid overwriting changes when multiple clients are simultaneously "uploading" (i.e., creating or updating docs). But preparing the POST directly is always possible, since the almost-REST API is documented as <strong>the</strong> protocol underlying all language-specific APIs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload