Skip to content

Instantly share code, notes, and snippets.

@vgrem
Created November 5, 2014 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vgrem/a098f30729b1707ef615 to your computer and use it in GitHub Desktop.
Save vgrem/a098f30729b1707ef615 to your computer and use it in GitHub Desktop.
Rename folder using SharePoint REST Interface
executor.executeAsync({
url: "<app web url>/_api/SP.AppContextSite(@target)/web
/getfolderbyserverrelativeurl('/Shared Documents/Orders')
?@target='<host web url>'",
method: "POST",
body: "{ '__metadata':{ 'type': 'SP.Folder' }, 'Name':'Archive Orders' }",
headers: {
"content-type": "application/json; odata=verbose",
"X-HTTP-Method": "MERGE"
},
success: successHandler,
error: errorHandler
});
@JacobKee
Copy link

image

unable to rename folder.
Please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment