Site resource

Add site - Add site v2

OVERVIEW

Note: the specification has been updated in Collaborate 4.3

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

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

<site>

<sitename>XMLAPITest01</sitename>

<sitedescription>This is site description</sitedescription>

<sitetemplateid></sitetemplateid> (Added in Collaborate 4.1.4)

<adminnote>This is admin note for Demosite</adminnote>

<category><id>1</id></category>

<startdate>20 Mar 2014</startdate>

<enddate>28 Feb 2022</enddate>

<type>Matter</type>

<clientno>100</clientno>

<matterno>300</matterno>

<module>

<home enable="1" />

<activity enable="1" />

<document enable="1" />

<wiki enable="0" />

<blog enable="0" />

<task enable="0" />

<event enable="0" />

<isheet enable="0" />

<qa enable="0" />

<people enable="0" />

</module>

<landingpage>files (root folder)</landingpage>

</site>

JSON

{

"sitename": "XMLAPITest01",

"sitedescription": "This is site description",

"adminnote": "This is admin note for Demosite",

"category": {

      "id": "1"

   },

"startdate": "20 Mar 2014",

"enddate": "28 Feb 2022",

"type": "Matter",

"clientno": "100",

"matterno": "300",

"module": {

"home": {

"enable": "1"

},

"activity": {

"enable": "1"

},

"document": {

"enable": "1"

},

"wiki": {

"enable": "0"

},

"blog": {

"enable": "0"

},

"task": {

"enable": "0"

},

"event": {

"enable": "0"

},

"isheet": {

"enable": "0"

},

"qa": {

"enable": "0"

},

"people": {

"enable": "0"

}

},

"landingpage": "files (root folder)" }

 

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>

 

Add site v2.pdf

Site creation sample.postman_collection

Comments


9 Comments

Last Updated: Jun 11,2023