Site resource

Get site list

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

This method returns the list of sites a user has access to in Collaborate. 

Please note that a site which has one of the configuration options enabled as specified in the "callfrom" parameter will not serve the documents using the API, as the configuration settings such as DRM, password protection etc cannot be bypassed using the API at the moment. Until we provide API endpoints that allow you to accept these settings using the API, there is no way to get documents from these sites, doing so will conflict with the Collaborate security policies and hence cannot be achieved using the API at this time. 

URL : /api/<version>/sites?

Query string parameters

 

Parameter Name

Value

Description

filterby

 

String

Possible values are {recent|favourite|category|all} Default for this field is “recent”

By default any filter will send back the first 20 sites if pagination is false

categoryid

Int

This parameter is used to get the site list based on the site category ID, please provide site categoryid in addition to setting the filterby property to category. 

example = /api/1/sites?filterby=category&categoryid=1 

returncount

Int

The no of sites returned. Default is 20. This option does not apply if filterBy property is set to all

status

String

A site status available in the system

{active|archived|readonly|preparation}

Default -> {active + readonly + preparation}

for filterBy={recent|favourite| category}]

if filterBy={all}  is set then all status become applicable.

Includefolderpermission

Boolean

{true|false}

the default is false

name String

This parameter is used to search a site by name. The site 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/sites?name='HighQ'

This will return all sites having "HighQ" in their site name. 

 
callFrom String The only valid value is HIGHQDRIVE. If set the site list filters out any sites that have any restrictions on them. The conditions are as under. 

           1. 'Visible on HighQ Drive or Office Plugin' check box is not selected in Site->Admin->Advanced page.

            2. Password protected site

            3. 2FA enable site

            4. Terms & conditions applied on the site

            5. IP Restricted sites

            6. Document workflow enabled site

            7. Check-in / check out enabled site

            8. DRM enabled site

            9. Files module is disabled

example: exclude restricted site as: /api/1/sites?callFrom=HIGHQDRIVE

 

For an Internal Admin the response XML is as below:

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

<sites>

    a list of site objects

</sites>

 

For a non-admin response, XML will be as per below :

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

<sites>

    <site>

        <id>3</id>

        <sitename>My site</sitename>

        <sitedescription />

        <sitefolderID>16</sitefolderID>

        <category>

            <name>None</name>

        </category>

        <status>Active</status>

    </site>

</sites>

 

Error Codes: 

 

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 wrong method)
500 Internal error occurred

 

Comments


6 Comments

Last Updated: Jun 09,2023