Chapter 12. Web Services

Drupal 8 ships with the RESTful functionality, to implement web services to interact with your application. This chapter shows you how to enable these features and build your own API:

  • Enabling RESTful interfaces
  • Using GET to retrieve data
  • Using POST to create data
  • Using PATCH to update data
  • Using Views to provide custom data sources
  • Authentication

Introduction

There are several modules provided by Drupal 8 that enable the ability to turn it into a web services provider. The Serialization module provides a means of serializing data to, or deserializing from formats such as JSON and XML. The RESTful Web Services module then exposes entities and other APIs through web APIs.

The HAL module serializes entities using Hypertext Application ...

Get Drupal 8: Enterprise Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.