When I'm trying to rename sub floder, I'm getting issue mention below:
"{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Invalid request."}}}"
Code:
var itemPayload = {}; itemPayload['Title'] = "new name"; itemPayload['FileLeafRef'] = "new name"; var headers = {}; headers["Accept"] = "application/json;odata=verbose"; headers["X-RequestDigest"] = $("#__REQUESTDIGEST").val(); $.ajax({ type: "POST", url: spURL + "/_api/web/GetFolderByServerRelativeUrl('/a/b/c')/ListItemAllFields", data: JSON.stringify(itemPayload), headers: headers, contentType: "application/json;odata=verbose", success: function(response) { alert(response); }, error: function(error) { debugger; } }); Thanks for the help!