Question

I can find the API call required to insert a meta-data-only file at https://developers.google.com/google-apps/documents-list/v2/developers_guide_protocol, bu this is v2. The equivalent page for v3 doesn't show the equivalent information.

Anybody know if this changed from v2 to v3, or is it the same format?

POST /feeds/folders/private/full/folder%3Afolder_id HTTP/1.1
Host: docs.google.com
Authorization: <your authorization header here>
Content-Length: 292
Content-Type: application/atom+xml

<?xml version='1.0' encoding='UTF-8'?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom">
  <atom:category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/docs/2007#presentation" label="presentation"/>
  <atom:title>new preso</atom:title>
</atom:entry>
Was it helpful?

Solution

The documentation for creating documents with metadata only (v3) is here: https://developers.google.com/google-apps/documents-list/#creating_a_new_document_or_file_with_metadata_only

The only differences I see are:

  • You should use the resumable-create-media link that you can get from the feed
  • You should set the header

    X-Upload-Content-Length: 0
    

OTHER TIPS

That version is deprecated. Use the Drive SK. Does this page solve your issue? They have a playground to try out the methods.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top