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.

didThe 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

folderApply action to this folder ID.
nameOptional. Apply action to this file name.
tlocale

Optional. Some actions require a destination. Locale of file to apply action to

tfolderOptional. Some actions require a destination. Apply action to this folder ID.
tnameOptional. Some actions require a destination. Apply action to this file name.
overwriteOptional. By default is false.
returnChangesOptional. By default is true. Tells if the method shall return the full file information or just null (faster).

 

ACTIONS

These actions are supported:

Action verbDescriptionlocalefoldernametlocaletfoldertnameoverwrite

movefile

Moves an existing file named name inside folder to another existing folder tfolder with new name tname.

xxxxxx 
renamefileRenames an existing file named name inside folder to new name tname.xxx  x 
copyfileCopies 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.xxxxxxx
deletefileDeletes file name inside parent folder folder.xxx    
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.

xxx  x 
unzipfileUnzips the file to a folder with same name on same directory level. "xxx.zip" => "xxx\....". Works with attachment folder only!xxx    
         
createfolderCreates new folder with name inside parent folder folder.xxx    
renamefolderRenames an existing folder named name inside folder to new name tname.xxx  x 
deletefolderCreates folder with name inside parent folder folder.xxx    

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.

xxxxxxx
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.

xxx  x 

 

 

RESULTS

If returnChages is true, then the method returns the same JSON as specified in:

resources/files/get

 

 

 

 

 

Copyright Wordbee - Buzzin' Outside the Box since 2008