Get site - Get site v2
OVERVIEW
Note: The specification has been updated in Collaborate 4.3
The get site API returned the details for a site. Anyone with site access in Collaborate is permitted to use this API endpoint.
The fields returned for the site object are determined based on user permissions. If the user is a site admin user then they will get fields like Admin Notes otherwise not.
The current implementation does not include logo link.
The response object contains the user ID of the site owner.
The API responds with an access denied message when “My site” details of another user are accessed.
Blank values for individual fields are not returned in the XML response, absence of value in the returned XML means that either the value does not exist for that field or the user does not have access to that field.
Request
GET: /sites/{siteid}
Parameters
Parameter Name | Value | Description |
---|---|---|
siteid | Int | The ID for the site in question |
Response
<?xml version="1.0" encoding="UTF-8"?>
<sites>
<site>
<id>1</id>
<sitename>My site</sitename>
<role></role> (CONTENT_ADMIN, MEMBER_ADMIN, QA_ADMIN, REPORTING_ADMIN, SITE_ADMIN, SYSTEM_ADMIN, CREATE_SITE_ROLE)
<sitedescription />
<sitefolderID>1</sitefolderID>
<sitefolderpermission>UPDATE</sitefolderpermission>
<adminnote />
<category>
<id>1</id>
<name>None</name>
</category>
<startdate/>
<enddate />
<createddate>14 Mar 2014</createddate>
<type>Service</type>
<clientno />
<matterno />
<status>Active</status>
<size>49.34MB</size>
<rawsitesize> (Added in 4.2 )
<activedocumentsize>51733834</activedocumentsize>
<deleteddocumentsize>821711</deleteddocumentsize>
<totalsize>52555545</totalsize>
</rawsitesize>
<rawsitesize>
<activedocumentsize>50614591</activedocumentsize>
<deleteddocumentsize>821711</deleteddocumentsize>
<totalsize>51436302</totalsize>
</rawsitesize>
<file>
<permissionlevel>SITE_AND_FOLDERS</permissionlevel> (SITE_ONLY/SITE_AND_FOLDERS/SITE_FOLDERS_AND_FILES- Added in 4.1.4 )
</file>
<issyncable>1</issyncable> (Added in 4.1.4 ) (0 : restriction applied, 1 : not restriction applied)
<siteowner>
<firstname>First</firstname>
<lastname>Last</lastname>
<email>first.last@domain.com</email>
<userid>103</userid>
</siteowner>
</site>
</sites>
In the case of an invalid site ID an error object is returned.
Please note that the site parameter is permissions specific, and only site admins will be returned the size of a site.
Hi,I hope each of the end point for GET/POST/DELETE defined in the swagger API requires some level of PERMISSION. What is the permission level required for POST request?
Vandana Sharma please raise a ticket with support and we can investigate. Include the full uri and headers of your request. I would also like to see the body we are returning, if you could attach that as a separate file support@highq.com
I am getting all sites details in result. I should get details of site whose id i am passing
Vandana Sharma OK so what exactly is the issue then?
i am getting response code 200.
Vandana Sharma Working for me now... in several different instances. I also have an integration with a dependancy on this endpoint and its working. What response code is the system returning for you?
facing issue in API. getting all site details in result. it was working fine till yesterday
Imran Aziz Thanks for pointing that out and noted RE the getting started guide...i'm just starting out on the journey and was keen to dive in! I just noticed that other areas of the site showing full path (such as get site list) which confused me. Look forward to seeing the swagger doc soon! David.
David Searle thank you for the feedback, please note that you are looking at an older documentation version of the API, it clearly states that at the top of the page. Also, we have followed a convention to list only the relative path of the API endpoint, this is clearly stated in the getting started guide.
In order to avoid such confusion in the future, we are working on the swagger documentation of the API endpoints.
Hi, could you update the documentation for this please as your usage is quite misleading and doesn't fit with other guidance on this wiki? The path to the sites API is via instance/api/{version}/sites/{siteid} , not /sites/{siteid}. I worked this out for myself but it's confusing when you compare to other technical notes on here which provide the full path. Otherwise, I find the resources helpful so thank you!
Giuseppe Carafa yes correct.
Imran Aziz Thanks Imran - so they are not necessarily, say, integers? A client number could be "ABC001" for example?
Giuseppe Carafa ClientNo and MatterNo are values that can be stored in reference to the site. i.e if the site relates to a specific matter you can store the Matter No in this field, same is the case with Client No if the site is being used for a specific client case. These values are stored as it is and when requested will return the stored values. There is no backend process or logic related to these values. In the UI sites can be searched using the ClientNo or MatterNo.
Hello Imran, can you clarify what clientno and matterno are used for, and what type of value would be returned in them if they are returned?
Comments
14 Comments