Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / productivity / SharePoint / SharePoint2016

REST Client for SharePoint

5.00/5 (3 votes)
29 Aug 2016CPOL2 min read 20.2K  
Exploring the REST API of SharePoint. This tool will help to test HTTP request very easily.

Introduction

This is the overview of SharePoint REST Client. SharePoint REST Client is a Chrome Extension for testing/exploring REST API of SharePoint. It can be very useful for testing HTTP requests like GET, POST, UPDATE or DELETE. It works on SharePoint 2010, 2013, 2016 and online.

Current Problem

There are many free REST clients available on the internet like Fiddler, Advanced REST Client, Postman and so on. These REST Clients have very user friendly UI for making complex requests and analyzing response but they do not work seamlessly with SharePoint. Some of the issues from Advanced REST Client are mentioned below:

  • It asks for credentials though you are logged in. This happens at on-premise site.

    ask for credential

  • It does not ask for credentials at SharePoint Online. It shows the following error.

    online error

  • It is mandatory to pass FormDigestValue for testing POST, UPDATE and DELETE request.
  • It is also needed to other headers like “Accept” : “application/json;odata=verbose”, “content-Type” : “application/json;odata=verbose”, “X-Http-Method” : “PATCH”, “If-Match” : “*” and so on.

To avoid the above issues, I have come up with SharePoint REST Client which will work on SharePoint very seamlessly.

sp rest client

SharePoint REST Client

Any HTTP requests like GET, POST, UPDATE or DELETE can be made very easily using this REST Client. Some tips are given below for using this tool:

  • Download and install SharePoint REST Client from store
  • Navigate or login on your SharePoint Site
  • Click on the extension icon
  • Your SharePoint page will be hidden and you will get the following UI for testing REST API

sp rest client ui

To make GET or DELETE request, you just have to pass the URL. There is no need to include host web URL in the request URL (start from /_api/).

For POST and UPDATE request, specify the request body as stringify JSON. For example:

JavaScript
{
  "__metadata": { "type" : "SP.Data.EmployeeListItem" },
  "FirstName" : "Atish",
  "LastName" : "Dipongkor"
}

For UPDATE and DELETE, you will not get any response but in case of error, this tool will show you the whole error. For GET and POST, you will get nicely formatted JSON like the following:

response

Conclusion

I hope this tool will be your ultimate REST Client for SharePoint. Please feel free to let me know if you face any other issue. Most importantly, it is open source. Let me know if you are interested in contributing on it. Find the GitHub repository below:

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)