I am using SharePoint REST API with python to move a file using the below URL
move_url = app_site + "/sites/" + sitename + "/_api/web/getfilebyserverrelativeurl(@SrcFile)/moveto(newurl=@DestFile,flags=1)?@SrcFile=" + src_file_to_dwnld + "&@DestFile=" + dest_file_to_downld + ""
The filename has a '
character in the name .e.g example Dec'd.pdf
.
I am always getting a response with the error message saying The query string "serverRelativeUrl" is missing or invalid
I came across this site where it says
It must not contain the following illegal characters: [!#$&'+:<>?\{|}~]|(//)|(..)|(/_)|(/wpresources$)|(/wpresources/)
I tried to follow the solution provided in this question to escape the character by using ''
but getting a 404
file not found error.
Is there anything am I doing wrong here?