1

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

Error:

<m:error 
    xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <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>
</m:error>

Is my relative url and headers are valid ?

0

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

Reference:

| improve this answer | |

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.