Class Index

Classes


Rename

Renames files and directories.
Defined in: rename.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Rename(data, verbose, fields)
Given the files/directories in "data" , this endpoint renames each to the provided name.
Class Detail
Rename(data, verbose, fields)
Given the files/directories in "data" , this endpoint renames each to the provided name.
Parameters:
data
an array of files/directories and their intended names [{"directory":"folder/", "name": "newName"}, {"id" : 123456, "name":"newFileName.txt"}, ...]
verbose Optional, Default: false
Setting this to true will collect a variety of default values for each asset.
fields Optional
An array of field id's to collect the values for each asset
Returns:
[{assetInfo},{directoryInfo}, ... ]
/wf/restapi/v2/rename

Parameters:
data=[{"id":201629375,"name":"newName"},{"directory":"rename/directory/","name":"NewDirName"}]
verbose=true

Response:
 [
	 {
	   "id": 201629375,
	   "name": "newName.txt",
	   "path": "rename/newName.txt",
	   "height": 0,
	   "width": 0,
	   "bytes": 0,
	   "lastModified": 1508167049000,
	   "mimeType": "text/plain",
	   "previews": {
		 "thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239333735",
		 "viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239333735",
		 "downloadUrl": "../servlet/dload?id=201629375"
	   }
	 },
	 {
	   "path": "rename/NewDirName/",
	   "name": "NewDirName",
	   "resolver": "directory://158"
	 }
 ]

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 06 2018 16:08:51 GMT-0500 (CDT)