Book Image

SharePoint Development with the SharePoint Framework

By : Jussi Roine, Olli Jääskeläinen
Book Image

SharePoint Development with the SharePoint Framework

By: Jussi Roine, Olli Jääskeläinen

Overview of this book

SharePoint is one of Microsoft's best known web platforms. A loyal audience of developers, IT Pros and power users use it to build line of business solutions. The SharePoint Framework (SPFx) is a great new option for developing SharePoint solutions. Many developers are creating full-trust based solutions or add-in solutions, while also figuring out where and how SPFx fits in the big picture. This book shows you how design, build, deploy and manage SPFx based solutions for SharePoint Online and SharePoint 2016. The book starts by getting you familiar with the basic capabilities of SPFx. After that, we will walk through the tool-chain on how to best create production-ready solutions that can be easily deployed manually or fully automated throughout your target Office 365 tenants. We describe how to configure and use Visual Studio Code, the de facto development environment for SPFx-based solutions. Next, we provide guidance and a solid approach to packaging and deploying your code. We also present a straightforward approach to troubleshooting and debugging your code an environment where business applications run on the client side instead of the server side.
Table of Contents (14 chapters)

SharePoint Online APIs

Developers need APIs in order to successfully integrate their solutions with other workloads and services. SharePoint Online exposes a good set of APIs, which we'll introduce in this chapter. In later chapters we'll walk through how to best employ the APIs, including authentication and authorization, as well as proper use cases for different kinds of APIs.

Currently, SharePoint Online exposes three types of APIs.

REST APIs, that can be found under the /_api/ URI, for example, https://{tenant}.sharepoint.com/_api/{commands}/{parameters}. This is the most common use case for accessing SharePoint Online structures, data, and information. A sample API call would be a call to the Lists API, which exposes all site lists. The URL for this would be https://{tenant}.sharepoint.com/_api/web/lists.

Note, that we need to first call /web/ underneath /_api/, in order to instruct the API to look at the current SharePoint site, and then call the Lists API:

The output, by default, is XML. This sample call exposes all SharePoint lists in the given SharePoint site.

The REST APIs available for SharePoint Online are listed here: https://msdn.microsoft.com/en-us/library/office/jj860569.aspx?f=255&MSPPError=-2147217396#Reference.

In addition to REST APIs, SharePoint Online still exposes a smaller subset of SOAP Web Services. These Web Services are from the SharePoint 2007 era, but still, work and can sometimes turn out to be useful in specific situations where the REST APIs can't be used or where they might not provide the needed information. In truth, the SOAP Web Services are randomly used and not something SharePoint Online developers should resort to unless absolutely needed.

The SOAP Web Services available for SharePoint Online are listed here: https://msdn.microsoft.com/en-us/library/office/gg454740%28v=office.14%29.aspx?f=255&MSPPError=-2147217396

Last, but definitely not least, are the Microsoft Graph APIs or, more specifically, endpoints. As the name implies, these are not specific to SharePoint Online but more of an overall collection of APIs that Microsoft Graph provides.