Skip to content

Instantly share code, notes, and snippets.

@squarelabsgit
Created August 25, 2023 01:55
Show Gist options
  • Select an option

  • Save squarelabsgit/6b356dc8843eeeb493eb3aa4fc551596 to your computer and use it in GitHub Desktop.

Select an option

Save squarelabsgit/6b356dc8843eeeb493eb3aa4fc551596 to your computer and use it in GitHub Desktop.
Rename WorkDrive Folder

Rename WorkDrive Folder

//Prepare WorkDrive API Headers
headerMap = Map();
headerMap.put("Accept","application/vnd.api+json");
//Prepare the required maps
dataMap = Map();
attributesMap = Map();
statusMap = Map();
//Update the maps with new folder name
statusMap.put("name",newFolderName);
attributesMap.put("attributes",statusMap);
attributesMap.put("type","files");
dataMap.put("data",attributesMap);
//Send update to WorkDrive API
renameFolder = invokeurl
[
	url :"https://www.zohoapis.com/workdrive/api/v1/files/" + workdriveFolderId
	type :PATCH
	parameters:dataMap.toString()
	headers:headerMap
	connection:"workdrive_connection"
];
info renameFolder;
return "";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment