Articles

JSON:API supports very simple multilingual functionality. It does not support advanced use cases.


The JSON:API module exposes entity revisions as resource versions, in a manner inspired by RFC5829: Link Relation Types for Simple Version Navigation between Web Resources.
Current limitations:


JSON:API makes it possible to retrieve multiple resources in a single request, these routes are called "collection" routes. One can fetch a collection of resources by sending a GET request to the base resource route, e.g. GET /jsonapi/node/article
and not including a UUID. By default, this will include all resources of the specified type.
Filtering and sorting are available by default on all standard resources.


Pagination can be a deceptively complex topic. It's easy to fall into traps and not follow best-practices. This page will help you do pagination "right". That is, if you read and understand this page, we think your client will be more robust and future-proof and make your life easier down the road.
If you take only one thing away from this guide, it should be that you should not construct your own pagination URLs.


TL;DR: Use a query string like ?include=field_comments.uid
to include all the entities referenced by field_comments
and all the entities referenced by uid
on those entities!
JSON:API helps you eliminate HTTP requests by allowing you to specify relationship paths which you would like to be included in the response document. How?


Collections are listings of resources. In a decoupled site, they're what you use to create things like a "New Content" list or "My content" section on the client-side.
However, when you make an unfiltered request to a collection endpoint like /jsonapi/node/article
, you'll just get every article that you're allowed to see.


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.


