Zoho Writer > Writer - REST API Methods > ZW - Get list of all documents

ZW - Get list of all documents

Tags:  



Get a list of documents for the user in his Zoho Writer account.

 
Request URL :

                            XML : http://export.writer.zoho.com/api/private/xml/documents?apikey=[API Key]&ticket=[Ticket]

                            JSON : http://export.writer.zoho.com/api/private/json/documents?apikey=[API Key]&ticket=[Ticket]


Request parameters

Field
Description
start-from [optional]
[integer] - Sets the initial document number from which the documents will be listed. It should always be a positive integer. If there are 10 documents and start-from value is set to 3, then the documents will be listed from the 3rd document.
limit [optional]
[integer] - Sets the number of documents to be listed. Allowed values for this parameter is from 1 to 100. If the number of document is less than the limit value then all documents are listed.

Response fields

The schema document for the API response is located at: http://export.writer.zoho.com/schema/restapi/documents.xsd

Field
Description
documentId
Unique ID associated with each document in the list.
documentName
Name of one of the documents that is being listed.
version
Specifies the last saved version of the document
lastModifiedTime
[LongValue] - Displays the last modified time as long integer.
lastModifiedBy
[string] - Specifies the name of the user of the user who has last edited the document. If the document is modified by the owner, then it displays "Me".
writePermisson
[boolean] - Checks whether the access privileges is read only or read/write for the shared users. If false, then the shared users can only read the document content.
document_name_url
Unique document url to differentiate multiple documents having similar name.
shared_users
Displays the list of email addresses to whom the document has been shared. Shows blank in case sharing access is disabled.
document_locked
Checks whether the document has been locked exclusively for editing in a shared environment. True means the lock is enabled.
document_blogged
Checks whether the document has been posted to any of the blog services. False status indicates that the document is not posted to any of the blog services.
author_name
Displays the Email ID/Zoho ID of the document owner, i.e., the account from which the document is created.
created_date
Displays the created date of the document. E.g. 1180532581984.
category
Displays the category of the document, whether 'OWNED' or 'SHARED'

Sample Response

The following is the sample response for the above method:


<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/private/xml/documents">
<result>
  <documents>
    <document>
      <documentId>7000000004003</documentId>
      <documentName>Resume</documentName>
      <version>1.4</version>
      <lastModifiedTime>1176118084655</lastModifiedTime>
      <lastModifiedBy>Me</lastModifiedBy>
      <writePermission>false</writePermission>
      <document_name_url>Resume</document_name_url>
      <shared_users>[]</shared_Users>
      <document_locked>false</document_locked>
      <document_blogged>false</document_blogged>
      <authorName>Gary</authorName>
      <created_date>1180532581984</created_date>
      <category>OWNED</category>
    </document>
  </documents>
</result>
</response>


Equivalent JSON response


{
  "response":
   {
        "uri": "/api/private/json/documents",
        "result":
        {
           "documents":
            {
                "document":
                [
                    {
                        "documentId
":"7000000004003",
                        "documentName":"Resume",
                        "version":"1.4",
                        "
lastModifiedTime":"1176118084655",
                        "lastModifiedBy":"Me",
                        "writePermission":"false",
                        "document_name_url":"Resume",
                        "shared_users":"[]",
                        "document_locked":"false",
                        "document_blogged":"false",
                        "authorName":"Gary",
                        "created_date":"1180532581984",
                        "category":"Owned",
                     }
                ]
            }
         }
    }
}  


Errors

Displaying list of documents method may return HTTP error code - 1416.



 RSS of this page