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, unique URL path, which all follow a shared pattern. Unlike the Drupal Core REST module, these paths are not configurable and are all enabled by default. Unlike core REST the JSON API is not simply a format like JSON or HAL+JSON. It encompasses a much broader set of rules about how your API will work.

Collections (filtering, sorting, and paginating)

When requesting a collection you'll eventually want to filter or sort the output as well as adding some pagination. This is possible pretty much out of the box by the jsonapi module. On this page we'll provide some examples on the filtering syntax and how to use the sorting and pagination in your projects.

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 completely understand all of the concepts of the specification to become productive with this module. If you would like to go deeper into how JSON API's documents are structured, why the module does something in one way or another, or just would like to learn more about the module's design, readers are encouraged to read the specification on jsonapi.org.

Contributed Modules

This is a space for contributed modules related to RESTful web services to put their documentation.

5. DELETE for deleting content entities

Follow these steps to expose resources to DELETE requests:

  1. Configuration
  2. Test with a DELETE request

Configuration

This builds upon the GET, POST and PATCH examples of the previous pages.

See Getting started: REST configuration & REST request fundamentals — Configuration

Sample requests below assume this configuration:

4. PATCH for updating content entities

Follow these steps to expose resources to PATCH requests:

  1. Configuration
  2. Test with a PATCH request

Configuration

This builds upon the GET and POST examples of the previous pages.

See Getting started: REST configuration & REST request fundamentals — Configuration

Sample requests below assume this configuration:

Pages

Subscribe with RSS Subscribe to RSS - rest