resources/files/command
Permits to manipulate files of a document.
URL
(POST) /resources/files/command
PARAMETERS
The message body contains a JSON object:
scope | The scope object. Note that if you use a document set or global search scope, you will receive an "available" = false result. In fact these scopes do not support files. |
did | The document id. This must be a document within the scope. |
action | The action to carry out. |
locale | Required. Locale of file to apply action to |
folder | Apply action to this folder ID. |
name | Optional. Apply action to this file name. |
tlocale | Optional. Some actions require a destination. Locale of file to apply action to |
tfolder | Optional. Some actions require a destination. Apply action to this folder ID. |
tname | Optional. Some actions require a destination. Apply action to this file name. |
overwrite | Optional. By default is false. |
returnChanges | Optional. By default is true. Tells if the method shall return the full file information or just null (faster). |
Â
ACTIONS
These actions are supported:
Action verb | Description | locale | folder | name | tlocale | tfolder | tname | overwrite |
---|---|---|---|---|---|---|---|---|
movefile | Moves an existing file named name inside folder to another existing folder tfolder with new name tname. | x | x | x | x | x | x | Â |
renamefile | Renames an existing file named name inside folder to new name tname. | x | x | x | Â | Â | x | Â |
copyfile | Copies an existing file named name inside folder to another existing folder tfolder with new name tname. Specify if target shall be overwritten if it exists. | x | x | x | x | x | x | x |
deletefile | Deletes file name inside parent folder folder. | x | x | x | Â | Â | Â | Â |
zipfile | Zips the file name and saves the zip into the same folder with extension .zip. tname is optional: If null (recommended), the zip is named automatically, otherwise it uses the indicated zip name. Note: You can use this method with attachments only. | x | x | x |  |  | x |  |
unzipfile | Unzips the file to a folder with same name on same directory level. "xxx.zip" => "xxx\....". Works with attachment folder only! | x | x | x | Â | Â | Â | Â |
 |  |  |  |  |  |  |  |  |
createfolder | Creates new folder with name inside parent folder folder. | x | x | x | Â | Â | Â | Â |
renamefolder | Renames an existing folder named name inside folder to new name tname. | x | x | x | Â | Â | x | Â |
deletefolder | Creates folder with name inside parent folder folder. | x | x | x | Â | Â | Â | Â |
copyfolder | Copies an existing folder with all its contents named name inside folder to another existing folder tfolder. Name the copied folder with tname. Specify if target shall be overwritten if it exists. | x | x | x | x | x | x | x |
zipfolder | Zips the folder name and creates a zip at the same folder level. tname is optional: If null (recommended), the zip is named automatically, otherwise it uses the indicated zip name. Note: You can use this method with attachments only. | x | x | x |  |  | x |  |
Â
Â
RESULTS
If returnChages is true, then the method returns the same JSON as specified in:
Â
Â
Â
Â
Â
Copyright Wordbee - Buzzin' Outside the Box since 2008