Get site templates - Get site templates v1
OVERVIEW
This API endpoint is valid from Collaborate 4.1.4 and above
API method to obtain a list of site templates
GET /api/2/sitetemplates
Query string parameters
Parameter Name |
Value |
Description |
---|---|---|
filterby
|
String |
Possible values are {recent|favourite|category|all} Default for this field is “recent” The method returns the first 20 records if no pagination is specified |
categoryid |
Int |
This parameter is used to get the site template list based on the site category ID, please provide site template categoryid in addition to setting the filterby property to "category". example = /api/1/sitetemplates?filterby=category&categoryid=1 |
returncount |
Int |
The no of site templates returned. The default is 20. This option does not apply if filterBy property is set to all. |
status |
String |
One of the two site template statuses available in the system {archived|preparation} Default -> {preparation} if filterBy={all} is set then all status become applicable. |
Includefolderpermission |
Boolean |
{true|false} default is false |
name | String |
This parameter is used to search site template by name. The site template is included in the search result if the string appears in the title of the site. The results are returned in ascending order. example: Retrieve sites having "HighQ" word in their name : /api/1/sitetemplates?name='HighQ' This will return all sites having "HighQ" in their site template name. |
For internal Admin Response XML :
<?xml version="1.0" encoding="UTF-8"?>
<sitetemplates>
<sitetemplate>
<id>1</id>
<sitename>My template</sitename>
<role></role>
<sitedescription />
<sitefolderID>1</sitefolderID>
<sitefolderpermission>UPDATE</sitefolderpermission>
<adminnote />
<categories>
<category>
<id>1</id>
<name>None</name>
</category>
<category>
<id>5</id>
<name>Collaborate 4.0</name>
</category>
</categories>
<startdate/>
<enddate />
<createddate>14 Mar 2014</createddate>
<type>Service</type> (Deprecated in 4.3)
<clientno />
<matterno />
<issyncable></issyncable>
<status>Active</status>
<siteowner>
<firstname>First</firstname>
<lastname>Last</lastname>
<email>first.last@domain.com</email>
<userid>103</userid>
</siteowner>
</sitetemplate>
</sitetemplates>
For non-admin users the Response XML will be:
<?xml version="1.0" encoding="UTF-8"?>
<sitetemplates>
<sitetemplate>
<id>3</id>
<sitename>My site</sitename>
<sitedescription />
<sitefolderID>16</sitefolderID>
<category>
<name>None</name>
</category>
<status>Active</status>
</sitetemplate>
</sitetemplates>
Response Code
Code | Meaning |
---|---|
400 |
Problem with parsing XML or JSON object (Bad Request) |
401 | Unauthorised |
403 | Validation failed/ Forbidden |
405 | Method not allowed (calling API with the incorrect method call) |
500 | Internal error occurred while obtaining site templates |
Comments
0 Comments