Get List Of Templates
Purpose
To get the list of templates based on the specified parameter.
Quick Reference
| Property | Value |
|---|---|
| Method | GET |
| Request URL | https://{zohoapis_domain}/writer/api/v1/templates |
| 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 |
|---|---|---|---|
| type | String | Optional | Specify the type (either personal or organization ) of templates that needs to be listed. For example: type = personal / organization By default, the type value will be 'personal'. Hence, personal templates will be listed. |
| offset | Integer | Optional | Set offset parameter to get the list of templates from the respective page. By default, offset value will be 0. |
| limit | Integer | Optional | Set document limit and retrieve the list of templates within the specified limit. By default, limit value will be taken as 50. |
| sortby | String | Optional | name Get the list of templates in the alphabetical order. created_time Get the list of templates with respect to the template created time. modified_time Get the list of templates with respect to the last modified time of the template. |
Notes
- For possible errors, refer to error codes.
Sample Request
Copiedcurl -X GET "https://www.zohoapis.com/writer/api/v1/templates?type=personal&limit=10&sortby=name" \
-H "Authorization: Zoho-oauthtoken <ACCESS_TOKEN>"Copiedparam = Map();
param.put("type","personal");
response = invokeurl
[
url :"https://www.zohoapis.com/writer/api/v1/templates"
type :GET
parameters:param
connection:"<connection_name>"
];
info response;Sample Response
Copied{
"total_count": 5,
"templates": [
{
{
"created_time": "2019-08-28T16:30:33Z",
"modified_time_ms": 1567009834477,
"owner_id": "14335411",
"last_opened_time": "2019-08-28T16:30:33Z",
"open_url": "https://writer.zoho.com/writer/template/a7iyybadb",
"last_opened_time_ms": 1567009833936,
"type": "template",
"thumbnail_url":"https://writer.zoho.com/writer/thumbnail/a7iyybadb",
"created_by": "amelia",
"created_time_ms": 1567009833936,
"modified_time": "2019-08-28T16:30:34Z",
"preview_url": "https://writer.zoho.com/writer/zwpreview/a7iyybadbb8",
"creator_id": "11122329",
"name": " New Template",
"id": "a7iyybadbb8b74e1147638bad04abc161e79e",
"permalink": "https://docs.zoho.com/file/a7iyybadb",
"status": "active"
}
},
{
"created_time": "2019-08-28T16:30:33Z",
"modified_time_ms": 1567009834477,
....
}
]
}