Skip to main content

Diigo Home

Developer's Guide: The Protocol - Google Documents List Data API - Google Code - The Diigo Meta page

code.google.com/...developers_guide_protocol.html - Cached - Annotated View

Joel Liu's personal annotations on this page

joel
Joel bookmarked on 2009-07-05 Google Doc API
    • To update an existing document, first you retrieve the document you want to update, then you modify it as desired, and then you send a PUT request to either the edit link or the edit-media link, depending on what is to be updated.



      You can update any of the following:


      • The document's metadata
      • The document's contents
      • Both metadata and contents at once (using a MIME multipart request)
  • The new document contents, which form part of the MIME multipart request, must have a content-type for which conversion is supported--for instance, to update a Google Docs document with new content, it could have content-type application/msword, or content-type text/plain, but not content-type application/vnd.ms-excel. When updating a Google Docs spreadsheet, however, content-type application/vnd.ms-excel would be appropriate. Content-types which are not supported by the document type being updated will result in an HTTP 400 Bad Request response.
  • For word documents, you can append data to the document's content by using the append=true parameter.
    The process is exactly the same as updating a document's content above. Here is an example of appending
    the text Appending this data! to a document.
  • PUT /feeds/media/private/full/document%3Adocument_id?append=true
    Host: docs.google.com
    Authorization: <your authorization header here>
    Content-Length: 20
    Content-Type: text/plain

    Appending this data!

This link has been bookmarked by 2 people . It was first bookmarked on 05 Jul 2009, by Joel Liu.

  • 06 Jul 09
  • 05 Jul 09
      • To update an existing document, first you retrieve the document you want to update, then you modify it as desired, and then you send a PUT request to either the edit link or the edit-media link, depending on what is to be updated.



        You can update any of the following:


        • The document's metadata
        • The document's contents
        • Both metadata and contents at once (using a MIME multipart request)
    • The new document contents, which form part of the MIME multipart request, must have a content-type for which conversion is supported--for instance, to update a Google Docs document with new content, it could have content-type application/msword, or content-type text/plain, but not content-type application/vnd.ms-excel. When updating a Google Docs spreadsheet, however, content-type application/vnd.ms-excel would be appropriate. Content-types which are not supported by the document type being updated will result in an HTTP 400 Bad Request response.
    • 2 more annotations...