I am trying to update a file in sharepoint using API. I am trying in POSTMAN only. Below are the url and headers which i send. I am using PUT Method. url:

https://groupname.sharepoint.com/sites/MMSN/_api/web/GetFileByServerRelativeUrl('Shared Documents/DB_Folder')/Files('db_sample.json')/$value

Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSU
X-HTTP-Method: PUT


    <m:code>-2147024809, System.ArgumentException</m:code>
    <m:message xml:lang="en-US">serverRelativeUrl&#xD;
Parameter name: Specified value is not supported for the serverRelativeUrl parameter.</m:message>

Is my relative url and headers are valid ?


The parameter of GetFileByServerRelativeUrl method should be the server-relative URL for the file. While you set a folder path.


  • Thank You @baker_kong_MSFT Apr 17 '20 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.