Event: 
Drupal Camp Chattanooga 2020
Parent Track: 
Development & Performance
Audience: 
All Attendees

The JSON:API module is a fully compliant implementation of the JSON:API Specification. In its own words, the JSON:API specification is:

A specification for how a client should request that resources be fetched or modified, and how a server should respond to those requests.

Drupal 8.7 ships with JSON:API which makes a solid and stable path to support decoupled Drupal through standardisation of payload structures and query string parameters.

JSON:API is designed to minimize both the number of requests and the amount of data transmitted between clients and servers. This efficiency is achieved without compromising readability, flexibility, or discoverability.

Drupal's data-structures, i.e. entity types, bundles, and fields, are incredibly well suited to the JSON:API.

Learning Objectives

The session will cover an introduction of the JSON:API specifications and how it compares with the Drupal 8 core REST module, when to go for JSON:API and what JSON:API can't do. We will also learn about why it made sense for JSON:API to be added to Drupal core.

You will also learn how to use the zero-configuration JSON:API module provides a standardised API for exposes resources, interacting with relationships between resources (entity references), fetching of only the selected fields, and filtering, sorting and paginating collections of resources.

At the end of this session, attendees will be able to know more and perform actions below:

  • What is JSON: API Specifications?
  • Intro about JSON: API Module in Drupal 8
  • JSON: API vs. core's REST module
  • JSON: API Security Considerations
  • How to work with JSON: API module?
  • GET requests for filters, sorting & pagination
  • POST Requests
  • PATCH Requests
  • GET Requests
  • Things which JSON:API can’t do
  • Gotchas
  • Live Demo

Target Audience
This hands on session is helpful for who are looking into build and consume web-service API via Drupal using JSON:API module. After this session audience will get to know awesomeness of the JSON:API module and it's OOTB features.

Prerequisites
Attendees will get the most out of this session by being familiar with Drupal 8 and web-services concepts like RESTful web-services