Files : API changes for 5.5 - Smart folder API changes
OVERVIEW
1. Add File API:
- This API is used to add a file.
Endpoint: /{version}/files/content
Method: POST
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
file | file | to insert a file | YES |
parentfolderid | number | folder id where file will be inserted | YES |
filename | string | file name | YES |
Note: if the parentfolder id is the same id as the smart folder then the API will return an access denied message in response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
add file in smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
2. Move File API:
- This API is used to move a file from one location to another location.
Endpoint: /{version}/files/{fileid}/parent
Method: PUT
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
fileid | number | file id of the file which will be moved | YES |
targetfolderid | number | folder id where file will be moved to | YES |
Note: if the targetfolderid is the same id as the smart folder then the API will return an access denied message in response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
move file in smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
3. Copy File API:
- This API is used to copy a file from one location to another location.
Endpoint: /{version}/files/{fileid}/parent
Method: POST
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
fileid | number | file id of the file to be copied | YES |
targetfolderid | number | folder id where file will be copied to | YES |
Note: if the targetfolderid is the same id as the smart folder then the API will return an access denied message in response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
copy file in smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
4. Move Folder API:
- This API is used to move a folder from one location to another location.
Endpoint: /{version}/folders/{folderid}/parent
Method: PUT
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
folderid | number | folder id of the folder to be moved | YES |
targetfolderid | number | folder id where folder will be moved to | YES |
Note: if the targetfolderid is the same id of the smart folder then the API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
move folder in smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
5. Copy Folder API:
- This API is used to copy a folder from one location to another location.
Endpoint: /{version}/folders/{folderid}/parent
Method: POST
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
folderid | number | folder id of the folder to be copied | YES |
targetfolderid | number | folder id where folder will be copied to | YES |
Note: if the targetfolderid is the same id as the smart folder then the API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
copy folder in smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
6. Add Folder API:
- This API is used to add a folder .
Endpoint: /{version}/folders
Method: POST
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
parentfolderid | number | ID of the parent folder where the folder will be added to | YES |
Note: if the parentfolderid is the same id as the smart folder then the API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
add folder in smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
7. Register Folder API:
- This API is used to register a given folder for the Changes API based on the source Client.
Endpoint: /{version}/changes/{sourceclient}/folder/{folderid}
Method: POST
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
folderid | number | ID of the folder which requires registering | YES |
Note: if the folderid is the same id as the smart folder then the API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
register smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
8. Remove register Folder API:
- This API is used to remove the registered folder for the Changes API based on the source client.
Endpoint: /{version}/changes/{sourceclient}/folder/{folderid}
Method: DELETE
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
folderid | number | ID of the folder which want to remove | YES |
Note: if the folderid is the same id as the smart folder then the API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
remove register smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
9. Add Placeholder File API:
- This API is used to add a placeholder file.
Endpoint: /{version}/files/placeholder
Method: POST
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
parentfolderid | number | folder id where file will be insert | YES |
filename | string | file name | YES |
Note: if the parentfolderid is the same id as the smart folder then the API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
add a placeholder file in smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
10. Get Folder Size API:
- This API is used to get the folder size from the folder ID.
Endpoint: /{version}/folders/{folderid}/foldersize
Method: GET
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
folderid | number | folder id of the folder you require the size for | YES |
Note: if the folder id is the same id as the smart folder then API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
folder id of smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
11. Restore from Recycle:
- This API is used to restore the folder from deleted items.
Endpoint: /{version}/folders/{folderid}/recycle
Method: POST
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
folderid | number | ID of the folder in deleted items | YES |
targetfolder | number | Target folder | YES |
Note: if the target folder id is the same id as the smart folder then the API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
folder id of smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
12. Get Folder List :
- This API is used to get the folder list.
Endpoint: /{version}/folders/{folderid}/items
Method: GET
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
folderid | number | To get the list of folders inside the given folderid | YES |
includesmartfolder | boolean | Whether to include smart folder (Default : false) | No |
Note: if the target folder id is the same id as the smart folder then the API will return an access denied message in the response with a 403 error code.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
folder id of smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <link>https://collabscrum78.hqdev.highq.com/collabscrum78/api/12/error/740851</link> <ref>130</ref> <summary>Access denied</summary> </error> |
SUCCESS:
Area | Response | Comment |
---|---|---|
Normal Folder id containing smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <folders> <folder> <id>691602</id> <name>Test</name> <permission> <view>1</view> <edit>1</edit> <delete>1</delete> <addEditAllFiles>1</addEditAllFiles> <viewAllFiles>1</viewAllFiles> <admin>1</admin> </permission> <child>0</child> <filecount>0</filecount> <parentFolderID>691593</parentFolderID> <accessInherited>1</accessInherited> <createddate>11 Jan 2021 09:14</createddate> <modifieddate>11 Jan 2021 11:54</modifieddate> <location>NP-5.5 smart folder final > Folder 5 (No File Permission)</location> <createdby> <firstname>Nirav</firstname> <lastname>Patel</lastname> <email>nirav.patel@highq.com</email> <userid>114</userid> </createdby> <modifiedby> <firstname>Nirav</firstname> <lastname>Patel</lastname> <email>nirav.patel@highq.com</email> <userid>114</userid> </modifiedby> <foldertype>SMART</foldertype> </folder> <folder> <id>691646</id> <name>Normalfolder</name> <permission> <view>1</view> <edit>1</edit> <delete>1</delete> <addEditAllFiles>1</addEditAllFiles> <viewAllFiles>1</viewAllFiles> <admin>1</admin> </permission> <child>0</child> <filecount>0</filecount> <parentFolderID>691593</parentFolderID> <accessInherited>1</accessInherited> <createddate>11 Jan 2021 12:10</createddate> <modifieddate>11 Jan 2021 12:10</modifieddate> <location>NP-5.5 smart folder final > Folder 5 (No File Permission)</location> <createdby> <firstname>Nirav</firstname> <lastname>Patel</lastname> <email>nirav.patel@highq.com</email> <userid>114</userid> </createdby> <modifiedby> <firstname>Nirav</firstname> <lastname>Patel</lastname> <email>nirav.patel@highq.com</email> <userid>114</userid> </modifiedby> <foldertype>NORMAL</foldertype> </folder> </folders> |
If includesmartfolder parameter is true then the smart folder and normal folder with <foldertype> tag will appear. |
13. Get Folder info :
- This API is used to get the folder information
Endpoint: /{version}/folders/{folderid}
Method: GET
Available from version: any
Type: Existing API
Parameters:
Query Parameters | Data type | Purpose | Mandatory |
---|---|---|---|
version | number | API version | YES |
folderid | number | To get the folder information of the given folderid | YES |
Note: if the folder id is the same id as the smart folder or normal folder then the API will return <foldertype> tag in version 12.With version 1 to 11 it will not show <foldertpye> tag.
RESPONSES:
ERROR:
Area | Response | Comment |
---|---|---|
folder id of smart folder | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <folder> <id>691602</id> <name>Test</name> <permission> <view>1</view> <edit>1</edit> <delete>1</delete> <addEditAllFiles>1</addEditAllFiles> <viewAllFiles>1</viewAllFiles> <admin>1</admin> </permission> <siteid>4321</siteid> <parentFolderID>691593</parentFolderID> <accessInherited>1</accessInherited> <createddate>11 Jan 2021 09:14</createddate> <modifieddate>11 Jan 2021 11:54</modifieddate> <location>NP-5.5 smart folder final > Folder 5 (No File Permission)</location> <createdby> <firstname>Nirav</firstname> <lastname>Patel</lastname> <email>nirav.patel@highq.com</email> <userid>114</userid> </createdby> <modifiedby> <firstname>Nirav</firstname> <lastname>Patel</lastname> <email>nirav.patel@highq.com</email> <userid>114</userid> </modifiedby> <contentstatus>1</contentstatus> <foldertype>SMART</foldertype> </folder> |
Comments
0 Comments