6.2 File System Service
6.2.1 POST New Folder Information
Url | [ThruWebServer]/REST/[version]/FileSystem/Folder |
---|---|
Verb | POST |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Creates a new folder in Thru file system |
Request Body | ThruPublicFolderInfo object |
Return Data Object | Updated ThruPublicFolderInfo object |
Invocation Scenario(s) | Create a new folder |
Remarks | Example request: Name=New+Folder&ParentFolderId=1UTXM50KW0ISP& |
6.2.2 GET Existing Folder Information
Url | [ThruWebServer]/REST/[version]/FileSystem/Folder/[FolderId] |
---|---|
Verb | GET |
Required HTTP Headers Accept: | (application/xml or application/json) |
Description | Retrieves a folder information based on the provided ID |
Request Body | None |
Return Data Object | ThruPublicFolderInfo object |
Invocation Scenario(s) | Get a folder information in order to fulfill it |
Remarks | All returned dates are in UTC. |
6.2.3 PUT Updated Folder Information
Url | [ThruWebServer]/REST/[version]/FileSystem/Folder/[FolderId] |
---|---|
Verb | PUT |
Required HTTP Headers | Accept: (application/xml or application/json) |
Content-Type: (application/xml or application/json) | undefined |
Description | Updates folder information based on the provided information. |
Request Body | ThruPublicFolderInfo object |
Return Data Object | Updated ThruPublicFolderInfo object |
Invocation Scenario(s) | Renaming folder |
Remarks
Value of the FolderID field in the posted
ThruPublicFileInfo DTO should reference to the existing and non-deleted folder. Otherwise, exception will be thrown.
Not all properties of ThruPublicFolderInfo can be modified:
Name
ParentFolderID
Description
Keywords
The following properties should not be provided; if provided, their values will be ignored:
FolderID
EffectivePermission
DateCreated
DateModified
CreatedByUserID
ModifiedByUserID
Exception will be thrown in case current user doesn’t have a right to do such modifications
ModifiedByUserID field of the folder will be updated if the statement succeeds
After successful processing of the command updated ThruPublicFolderInfo object will be returned
Example request: folderId=3V45C8UTHL0A3&Name=&ParentFolderId=&
Description=New+Description&Tags%5B%5D=
6.2.4 DELETE Existing Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Folder/[FolderId] |
---|---|
Verb | DELETE |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Deletes folder and its content based on the provided information. No additional data should be passed on the request body |
Request Body | None |
Return Data Object | None |
Invocation Scenario(s) | Mark folder and all underlying files and folders as deleted |
Remarks | The folder could be restored later by administrator based on the Thru server configuration |
6.2.5 GET Home Folder Information
Url | [ThruWebServer]/REST/[version]/FileSystem/Home |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a home folder information of the authenticated user |
Request Body | None |
Return Data Object | ThruPublicFolderInfo object |
Invocation Scenario(s) | Get a home folder information of the authenticated user |
Remarks | All returned dates are in UTC. |
6.2.6 GET List of Files and Folders Inside a Home Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Home/Content |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of file and folder information structures based on the home folder information of the authenticated user. |
Request Body | None |
Return Data Object | |
ThruPublicContentResult object | undefined |
Invocation Scenario(s) | Get a full content of the folder |
Remarks |
6.2.7 GET List of Files Inside a Home Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Home/Content/Files |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of file information structures based on the home folder information of the authenticated user. |
Request Body | None |
Return Data Object | ThruPublicContentResult object |
Invocation Scenario(s) | Get files in the folder |
Remarks |
6.2.8 GET List of Folders Inside a Home Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Home/Content/Folders |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of folder information structures based on the home folder information of the authenticated user. |
Request Body | None |
Return Data Object | ThruPublicContentResult object |
Invocation Scenario(s) | Get folders in the folder |
Remarks |
6.2.9 GET Root Folder Information
Url | [ThruWebServer]/REST/[version]/FileSystem/Root |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a root folder information of the authenticated user |
Request Body | None |
Return Data Object | ThruPublicFolderInfo object |
Invocation Scenario(s) | Get information of the root folder |
Remarks | All returned dates are in UTC. |
6.2.10 GET List of Files and Folders Inside a Root Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Root/Content |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of file and folder information structures based on the root folder information of the authenticated user. |
Request Body | None |
Return Data Object | |
ThruPublicContentResult object | undefined |
Invocation Scenario(s) | Get a full content of the folder |
Remarks |
6.2.11 GET List of Files Inside a Root Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Root/Content/Files |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of file information structures based on the root folder information of the authenticated user. |
Request Body | None |
Return Data Object | ThruPublicContentResult object |
Invocation Scenario(s) | Get files in the folder |
Remarks |
6.2.12 GET List of Folders Inside a Root Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Root/Content/Folders |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of folder information structures based on the root folder information of the authenticated user. |
Request Body | None |
Return Data Object | ThruPublicContentResult object |
Invocation Scenario(s) | Get folders in the folder |
Remarks |
6.2.13 GET List of Files and Folders Inside a Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Folder/[FolderId]/Content |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of file and folder information structures based on the provided parent folder ID. |
Request Body | None |
Return Data Object | ThruPublicContentResult object |
Invocation Scenario(s) | Get a full content of the folder |
Remarks |
6.2.14 GET List of Files Inside a Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/Folder/[folderId]/Content/Files |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of file information structures based on the provided parent folder ID. |
Request Body | None |
Return Data Object | ThruPublicContentResult object |
Invocation Scenario(s) | Get files in the folder |
Remarks |
6.2.15 GET List of Folders Inside a Folder
Url | [ThruWebServer]/REST/[version]/FileSystem/ Folder/[folderId]/Content/Folders |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a collection of folder information structures based on the provided parent folder ID. |
Request Body | None |
Return Data Object | ThruPublicContentResult object |
Invocation Scenario(s) | Get folders in the folder |
Remarks |
6.2.16 GET Existing File Information
Url | [ThruWebServer]/REST/[version]/FileSystem/File/[FileId] |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a file information based on the provided ID |
Request Body | None |
Return Data Object | ThruPublicFileInfo object |
Invocation Scenario(s) | Get a file information in order to fulfill it |
Remarks | All returned dates are in UTC. |
6.2.17 PUT Updated File Information
Url | [ThruWebServer]/REST/[version]/FileSystem/File/[FileId] |
---|---|
Verb | PUT |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Updates file information based on the provided information. Information should be passed in the body as a serialized representation of the |
Request Body | ThruPublicFileInfo object |
Return Data Object | Updated ThruPublicFileInfo object |
Invocation Scenario(s) | Renaming file |
Remarks
Value of the FileID field in the posted
ThruPublicFileInfo DTO should reference to the existing, non-deleted, non-quarantined file. Otherwise, exception will be thrown
Not all properties of
ThruPublicFileInfo can be modified:
Name
ParentFolderID
Description
Keywords
ParentFolderID
The following properties should not be provided; if provided, their values will be ignored:
Size
DateCreated
DateModified
CreatedByUserID
ModifiedByUserID
IsQuarantined
ModifiedByUserID field of the file will be updated if the statement succeeded
After successful processing of the command updated
ThruPublicFileInfo object will be returned
6.2.18 DELETE Existing File
Url | [ThruWebServer]/REST/[version]/FileSystem/File/[FileId] |
---|---|
Verb | DELETE |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Deletes file based on the provided information. No additional data should be passed on the request body. |
Request Body | None |
Return Data Object | None |
Invocation Scenario(s) | Mark file whose ID is specified in URL as deleted |
Remarks | Possibly later this file can be restored by administrator based on the Thru server configuration |