From the course: SharePoint Framework Essential Training

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Demo: Use SharePoint REST API to work with lists

Demo: Use SharePoint REST API to work with lists

From the course: SharePoint Framework Essential Training

Demo: Use SharePoint REST API to work with lists

- [Instructor] Let's get an understanding of how the SharePoint REST API works. Now, the first thing that we need to think about is, how does authentication work? So remember the REST API was created when the CSOM model and the add-in model was created. The add-in model is on its way out and had a way to get an access token. So I'm not going to show you that because it is on its way to deprecation. However, I have a few examples written over here using REST API. We're going to try and get the title of the site and these are going to rely on the fetch method, which is built into the dev tools of any web kit-based browser like Edge or Chrome or Safari. Now if you're using SPFx, these examples will work as is, Instead of using fetch, of course, fetch will also work, but you can just use like jQuery or $get or $.ajax, whatever Ajax-y way you have of making this REST call. Later on, I'll also show you how to do this with Microsoft Graph, at least for the operations that are supported in…

Contents