Get List of Documents with Specified Parameters
Purpose
To get a list of documents with specified parameters.
Quick Reference
| Property | Value |
|---|---|
| Method | GET |
| Request URL | https://{zohoapis_domain}/writer/api/v1/documents |
| Scopes | ZohoWriter.documentEditor.ALL, ZohoPC.files.ALL, WorkDrive.files.ALL, WorkDrive.organization.ALL, WorkDrive.workspace.ALL |
| Rate Limit | See Writer API throttle limits |
Parameters
Query Parameters
| Parameter | Data Type | Mandatory/Optional | Description |
|---|---|---|---|
| offset | Integer | Optional | Set offset parameter to get the list of documents from the respective page.
|
| limit | Integer | Optional | Set document limit and retrieve the list of documents within the specified limit.
|
| sortby | String | Optional | created_time Get the list of documents with respect to the document created time. modified_time Get the list of documents with respect to the last modified time of the document. name Get the list of documents with respect to the document name. Defaultdateformat: IS08601
|
| sort_order_by | String | Optional | ascending Get the list of documents in the ascending order based on the 'sortby' param value configured. descending Get the list of documents in the descending order based on the 'sortby' param value configured.
|
| category | String | Optional | all Get all the list of documents. shared_to_me Get only the list of documents which are shared to you. owned_by_me Get only the list of documents which are created by you. By default, the category value will be all. Here, all the documents will be listed. |
| resource_type | String | Optional | Enter the document type from which the specified list needs to be retrieved. Possible values: fillable/merge/sign |
Notes
- You can also fetch the list of all documents from Zoho Writer using this deluge task.
- For possible errors, refer to error codes.
Sample Request
Copiedcurl -X GET "https://www.zohoapis.com/writer/api/v1/documents?limit=10&offset=0&sortby=modified_time&sort_order_by=descending&category=all" \
-H "Authorization: Zoho-oauthtoken <ACCESS_TOKEN>"
Copiedparam = Map();
param.put("offset",0);
response = invokeurl
[
url :"https://www.zohoapis.com/writer/api/v1/documents"
type :GET
parameters:param
connection:"<connection_name>"
];
info response;Sample Response
Copied{
"offset": 2,
"documents": [
{
"document_name": "Presales tips",
"created_time": "2018-03-30T10:58:48Z",
"modified_time": "2018-03-30T13:54:51Z",
"preview_url": "https://writer.zoho.com/writer/preview/ponaz5c1a267e61074c50a012d8e4b519c755",
"creator_id": "4579020",
"download_url": "https://writer.zoho.com/api/v1/download/ponaz5c1a267e61074c50a012d8e4b519c755",
"open_url": "https://writer.zoho.com/writer/open/ponaz5c1a267e61074c50a012d8e4b519c755",
"document_id": "ponaz5c1a267e61074c50a012d8e4b519c755",
"lastmodified_by": [
{
"email_id": "amelia@zylker.com",
"profile_photo": "https://contacts.zoho.com/file?t=user&ID=4579020&fs=thumb",
"user_id": "4579020",
"display_name": "Amelia"
}
],
"created_by": "Amelia",
"published_url": "https://writer.zoho.com/writer/published/ponaz5c1a267e61074c50a012d8e4b519c755",
"document_type": "document"
},
{
"document_name": "Shared images",
"created_time": "2018-03-23T10:19:19Z",
"modified_time": "2018-03-23T13:52:58Z",
"preview_url": "https://writer.zoho.com/writer/preview/ponazbbf33e7932664100bd1f2dd342b88822",
"creator_id": "4579020",
"download_url": "https://writer.zoho.com/api/v1/download/ponazbbf33e7932664100bd1f2dd342b88822",
"open_url": "https://writer.zoho.com/writer/open/ponazbbf33e7932664100bd1f2dd342b88822",
"document_id": "ponazbbf33e7932664100bd1f2dd342b88822",
"lastmodified_by": [
{
"email_id": "amelia@zylker.com",
"profile_photo": "https://contacts.zoho.com/file?t=user&ID=4579020&fs=thumb",
"user_id": "4579020",
"display_name": "Amelia"
}
],
"created_by": "Amelia",
"published_url": "https://writer.zoho.com/writer/published/ponazbbf33e7932664100bd1f2dd342b88822",
"document_type": "document"
},
{
"document_name": "Investment details",
"created_time": "2018-03-21T10:23:24Z",
"modified_time": "2018-03-21T10:23:24Z",
"preview_url": "https://writer.zoho.com/writer/preview/ponaz12a14c978a764c9db6b94232b0a92e25",
"creator_id": "4579020",
"download_url": "https://writer.zoho.com/api/v1/download/ponaz12a14c978a764c9db6b94232b0a92e25",
"open_url": "https://writer.zoho.com/writer/open/ponaz12a14c978a764c9db6b94232b0a92e25",
"document_id": "ponaz12a14c978a764c9db6b94232b0a92e25",
"lastmodified_by": [
{
"email_id": "amelia@zylker.com",
"profile_photo": "https://contacts.zoho.com/file?t=user&ID=4579020&fs=thumb",
"user_id": "4579020",
"display_name": "Amelia"
}
],
"created_by": "Amelia",
"published_url": "https://writer.zoho.com/writer/published/ponaz12a14c978a764c9db6b94232b0a92e25",
"document_type": "document"
},
{
"document_name": "Sample Document",
"created_time": "2018-03-16T12:43:26Z",
"modified_time": "2018-03-16T15:33:52Z",
"preview_url": "https://writer.zoho.com/writer/preview/ponaz34571ac4b9d64b92954237afd19791d5",
"creator_id": "4579020",
"download_url": "https://writer.zoho.com/api/v1/download/ponaz34571ac4b9d64b92954237afd19791d5",
"open_url": "https://writer.zoho.com/writer/open/ponaz34571ac4b9d64b92954237afd19791d5",
"document_id": "ponaz34571ac4b9d64b92954237afd19791d5",
"lastmodified_by": [
{
"email_id": "amelia@zylker.com",
"profile_photo": "https://contacts.zoho.com/file?t=user&ID=4579020&fs=thumb",
"user_id": "4579020",
"display_name": "Amelia"
}
],
"created_by": "Amelia",
"published_url": "https://writer.zoho.com/writer/published/ponaz34571ac4b9d64b92954237afd19791d5",
"document_type": "document"
},
{
"document_name": "Finalised Document",
"created_time": "2018-03-16T11:06:03Z",
"modified_time": "2018-03-16T11:06:03Z",
"preview_url": "https://writer.zoho.com/writer/preview/ponazbf7688e056494f9a81c6a1a0231d52c5",
"creator_id": "4579020",
"download_url": "https://writer.zoho.com/api/v1/download/ponazbf7688e056494f9a81c6a1a0231d52c5",
"open_url": "https://writer.zoho.com/writer/open/ponazbf7688e056494f9a81c6a1a0231d52c5",
"document_id": "ponazbf7688e056494f9a81c6a1a0231d52c5",
"lastmodified_by": [
{
"email_id": "amelia@zylker.com",
"profile_photo": "https://contacts.zoho.com/file?t=user&ID=4579020&fs=thumb",
"user_id": "4579020",
"display_name": "Amelia"
}
],
"created_by": "Amelia",
"published_url": "https://writer.zoho.com/writer/published/ponazbf7688e056494f9a81c6a1a0231d52c5",
"document_type": "document"
}
],
"total_count": 9,
"limit": 5
}