Get folder list
OVERVIEW
This API method provides a list of folders under a given folder.
Request
GET /api/1/folders/{folderid}/items
Parameters
| Parameter Name | Value | Description |
|---|---|---|
| folderid | Int | The ID for the folder in question, Please use the get site method to get the root folder ID of the site. |
Query Parameters
| Parameter Name | Value | Description |
| limit | Int | The no of items to return for this request |
| offset | Int | The starting point for each item returned |
| orderby | String | The items can be organised by either asc/desc order |
| ordertype | String | In addition to the order we can organise items by name/author and last modified date. |
Request body
No request body is required for this call.
Response
API Version 1
<folders> <folder> <id>10603</id> <name>First</name> <permission>UPDATE</permission> <!-- ( Permission Element in API version 1) --> <child>1</child> <parentFolderID>210</parentFolderID> <accessInherited>1</accessInherited> <!-- (supported from 4.0.2 branch) --> <createddate>19 Aug 2016 07:04</createddate> <modifieddate>19 Aug 2016 07:04</modifieddate> <location>folder1/folder2</location> <!-- (supported from 4.0.3 branch) --> <createdby> <firstname>first</firstname> <lastname>last</lastname> <email>first.last@domain.com</email> <userid>368</userid> </createdby> <modifiedby> <firstname>first</firstname> <lastname>last</lastname> <email>first.last@domain.com</email> <userid>368</userid> </modifiedby> </folder></folders>
API Version 2 (Support from 4.0.3)
<folders> <folder> <id>10603</id> <name>First</name> <permission> <view>1</view> <edit>1</edit> <delete>1</delete> <addEditAllFiles>1</addEditAllFiles> <!-- ( Permission Element in API version 2) --> <viewAllFiles>1</viewAllFiles> <admin>1</admin> </permission> <child>1</child> <auto-numbering>2.1</auto-numbering> <!-- (Added in 4.1.3) --> <filecount>65</filecount> <!-- ( file count tag has been added in 4.1.3 ) --> <parentFolderID>210</parentFolderID> <accessInherited>1</accessInherited> <!-- (supported from 4.0.3 branch) --> <createddate>19 Aug 2016 07:04</createddate> <modifieddate>19 Aug 2016 07:04</modifieddate> <location>folder1/folder2</location> <!-- (supported from 4.0.3 branch) --> <createdby> <firstname>first</firstname> <lastname>last</lastname> <email>first.last@domain.com</email> <userid>368</userid> </createdby> <modifiedby> <firstname>first</firstname> <lastname>last</lastname> <email>first.last@domain.com</email> <userid>368</userid> </modifiedby> </folder></folders>
| Parameter Name | Value | Description |
|---|---|---|
| id | Int | The ID for the folder in question |
| name | String | Name of the folder /file |
| permission | String | Permission for this item. |
| child | String | The no of children under this item |
| createddate | Date |
Date is provided in “dd mmm yyyy” format based on UTC timezone.
|
| modifieddate | Date | The modified date for this item |
| createdby | Object | Details of the person who created this object, this is a cut down user object item |
| modifiedby | Object | Details of the person who created this object, this is a cut down user object item |
| filecount | Integer | The no of files in this folder |
| Auto-numbering | Integer | The auto numbering value for the specific folder. |
In case of an error the method returns an error object.
Notes
- The value of limit parameter behaves as following
limit =100 is the default value
if limit>0 then (number of items returned is equal to limit)
if limit=-1 then return all records
if limit <-1 then the system returns the default no of items i.e 100 - The value of Offset parameter behaves as under
(Default) offset =0
if offset > 0 then the records are returned from the offset value
if offset < 0 then offset value of 0 is set - Default value for orderby parameter is asc
- Default value if ordertype is creation date
- The return elements of permissions and accessInherited was added in version 4.0.3 of the API and are explained in the Get Folder Info API
- The location element has been added in Collaborate 4.0.3 and provides the folder hierarchy of the specific folder on the site.
Error codes
| Code | Meaning |
|---|---|
| 200 | Get Folder List successfully |
| 400 | Problem with parsing XML or JSON object (Bad Request) |
| 401 | Unauthorized |
| 403 | Validation failed/ Forbidden |
| 405 | Method not allowed (called API with the wrong method) |
| 500 | Internal error occurred |
Comments
0 Comments