This SharePoint Rest API tutorial, we will discuss how to use REST API to get data from custom people directory. We will see how to create a custom people directory using REST API in SharePoint Online or SharePoint 2013/2016.
If you are new to Rest API SharePoint, check an article on SharePoint Rest API Tutorial and Examples.
Create a Custom People Directory using REST API in SharePoint
Let’s begin to create a custom people directory by using SharePoint out of box contact list that contains custom columns as below screenshot.
Let’s see how we can retrieve data using Rest API and show the result in a script editor web part in SharePoint.
One thing to notice here, we are using jQuery and Ajax to call the REST API. Using a Search box to search names that match with the Contact’s name.
The above code will parse the JSON data and append the parsed data in the JSON Data div.
Now we go ahead to debug this code. So we need to enter any name in the Text box to see the result.
Since we got the data already, with that we can apply custom HTML and CSS to show the results in nicely formatted way.
We have reached the end of our journey. I hope you enjoyed learning with me and now feel confident to continue on to your next adventure.
You may also like following SharePoint Rest API tutorials:
- Get All Attachments From SharePoint 2013 List Item using Rest API
- SharePoint Rest API Filter Example
- Display SharePoint List Data in Tabular format using AngularJS in SharePoint Online
- Display SharePoint list items using rest api
- Testing SharePoint REST API using Postman
- Upload attachment to a new item on the list using REST API JQuery in SharePoint 2013
- Delete SharePoint List Item attachment using Rest API
- Display SharePoint list item level attachments using REST API and JQuery in SharePoint 2013
But it doesn’t have to end here. My next article will focus on helping you get started with the very exciting custom Web Parts in SharePoint 2013/2016/2019 and SharePoint online.
It was a pleasure to be on this journey with you.
Rajkiran is currently working as a SharePoint Consultant in India . Rajkiran having 7+ years of experience in Microsoft Technologies such as SharePoint 2019/2016/2013/2010, MOSS 2007,WSS 3.0, Migration, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc.He is C#Corner MVP (2 Times).