404 Not Found - SharePoint Server 2016 - POSTMAN REST API

Brass Contributor

Try as I might to create the URL in Postman, I am constantly getting a 404 Not Found error when I try and GET a document (basically a file exists check).

 

I am accessing SharePoint on premises 2016 and have....

Headers:
User-Agent
X-RequestDigest


Authorization:
Username
Password

 

This is the URL format:
https://{server}/{site-relative-path}/_api/v2.0

 

I'm not sure whether the library name goes in the site relative path or under the server but tried everything and I've used GetFolderByRelativeServerUrl for the site relative path.

 

Any pointers anyone please?

1 Reply

@Si_Da You got to make sure that the user you are requesting the token on behalf of have access to the library where the document resides.

 

The api documentation is not great. We have found that doing it via Microsoft Graph is a better option, it may be a bit more laborious  but they have a Postman Collection which is great for getting started. You can see how here: https://docs.microsoft.com/en-us/graph/use-postman?view=graph-rest-1.0

 

We have found that using relative path is very tricky and getting the right syntax have proven to be difficult. So we have stuck to using id's instead.

 

Hope this is helpful