Easy to use wrapper for the Sharepoint Rest API v1. Even if this is not a full implementation it covers most common use cases and provides examples to extending this API.
Call of moveFolder() results in HttpClientErrorException.
The exception contains a detailMessage: 400 Bad Request: "{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The parameter name flags is not valid."}}}"
I copied the moveFolder() method and modified it to leave the flags away. So the URL is not
https://<company-site>/_api/web/GetFolderByServerRelativeUrl('/sites/<site>/<from>/')/moveto(newUrl='/sites/<site>/<to>/',flags=1)
but instead
https://<company-site>/_api/web/GetFolderByServerRelativeUrl('/sites/<site>/<from>/')/moveto(newUrl='/sites/<site>/<to>/')
With this modification the exception did not occur anymore, and the folder was moved as expected.
Call of
moveFolder()
results inHttpClientErrorException
.The exception contains a
detailMessage
:400 Bad Request: "{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The parameter name flags is not valid."}}}"
I copied the
moveFolder()
method and modified it to leave the flags away. So the URL is nothttps://<company-site>/_api/web/GetFolderByServerRelativeUrl('/sites/<site>/<from>/')/moveto(newUrl='/sites/<site>/<to>/',flags=1)
but insteadhttps://<company-site>/_api/web/GetFolderByServerRelativeUrl('/sites/<site>/<from>/')/moveto(newUrl='/sites/<site>/<to>/')
With this modification the exception did not occur anymore, and the folder was moved as expected.