Contributed modules

JSON API

If you’ve ever argued with your team about the way your JSON responses should be formatted, JSON API can be your anti-bikeshedding tool.

By following shared conventions, you can increase productivity, take advantage of generalized tooling, and focus on your application. See JSON API specs.

There's also documentation for the architecture of the JSON API module.

Clients are able to take advantage of its features around efficiently caching responses, sometimes eliminating network requests entirely.

More docs in the knowledge hub in Contenta CMS.

KH

JSON API

The JSON API module is a fully compliant implementation of the JSON API Specification.

API Overview

The API that the JSON API module makes available is centered around the Drupal's entity types and bundles. Every bundle receives its own,

Core Concepts

JSON API has many concepts in the specification, not all of which are documented here. However, users of the module do not need to

GET, POST, PATCH and DELETE

This section contains examples and information per request type.:

Fetching resources (GET)

This page shows examples of various GET requests for the JSON API module.

Creating new resources (POST)

This page shows examples of various POST requests for the JSON API module.

Working with files (POST)

JSON API has its own temporary solution for BASE64 file upload.

Updating existing resources (PATCH)

This page shows examples of PATCH requests for the JSON API module.

Removing existing resources (DELETE)

This page shows examples of DELETE requests for the JSON API module.

Collections and Sorting

JSON API makes it possible to retrieve multiple resources in a single request, these routes are called "collection" routes. One can fetch a

Filtering

Filters let you limit your collections to just the entities you need.

Pagination

Learn how to handle collections which require multiple requests

What JSON API DOESN'T do

Business rules like creating an account, login and requesting a new password are not part of JSON API.

JSON API Extras

For altering JSON API configuration use JSON API Extras.

Related projects

JSON API 8.x

Guide maintainers