Site resource

Add site

OVERVIEW

This is the latest version of this API endpoint valid from Collaborate 4.3 and above, for older versions please see the child pages of this page

Use this API to create a new site.

The site object only supports attributes which are visible in the create site interface.

The method implementation now supports site templates.

This method does not support uploading site image in this call, the site icon support will be provided as a separate call.

The method call expects an existing category ID. The category ID should be obtained by the calling application by an earlier call to the Site categories interface.

Site start and end date should be in the format of 'dd MMM yyyy' and it is NOT UTC. API client will always request actual date.

We expect three different wordings or identifications for options in <landingpage> for Files module. Possible values are:

·      files (root folder)

·      files (recent activity)

·      files (advanced search)

Request

POST  /sites

Request XML

The method expects a site object as the request body

The minimum required parameters to create a site using a site template are as under

<site>

         <sitename></sitename>

         <sitetemplateid></sitetemplateid>

         <landingpage></landingpage>

        <module></module>

</site>

Response

 

The method returns a 201 OK in case of successful creation of the site. The returned XML provides the new sites ID:

 

<site>
    <id>100</id>
    <sitename>Demosite</sitename>
   
<link>
https://clientinstance.local.com/clientinstance/api/1/sites/161</link>
</site>

 

The method returns an error object in case of an error.

 

Example error object:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<error> <link>https://collab.local.com/collab_3_3_0/api/1/error/189</link>     <ref>144</ref>   <summary>Site name required.</summary>

</error>

Comments


2 Comments

Last Updated: Jun 11,2023