Technology RadarTechnology Radar

JSON:API

JSON:API is a specification for building HTTP APIs in JSON. One of its goals is to stop bikeshedding and allow developers to focus on building the actual application.

When a server follows the JSON:API specification, a client can expect the same structure in the response for every endpoint. This makes it easier to build clients that can consume any JSON:API-compliant API.

Learn more about JSON:API

Updates

Adopt

We at Factorial now leverage JSON:API to implement decoupled content management architectures for websites. In this architecture an otherwise headless CMS provides a user interface to editors and content creators. The backend the CMS exposes JSON:API endpoints to the frontend, which in turn consumes the data added by the content creators.

The JSON:API Drupal Core module exists and provides CRUD operations for a website's content following the established standard that comes with the specification while still relying on strengths of Drupal like caching, content management, authentication and authorization. With this no-code solution we are able to dramatically reduce the effort it takes to build a decoupled website from a backend perspective: No matter if it is about just providing data to a frontend or even offering editing capabilities to it, this solution serves it all.

The specification define standard query parameters to be used to do filtering, sorting, restricting fields that are returned, pagination and so on. Shibin's drupal-jsonapi-params eases working with these in the frontend by providing a simple API to build these query parameters.

Trial

We'll be trialing JSON:API in our next project to see if it helps us decoupling frontend and backend.