Module Description
The JSON:API Resources module makes it possible to define custom JSON:API routes. It does not define any custom routes of its own.

This can be incredibly valuable for providing custom collections (like a/jsonapi/featured-posts route) and contextual data (like a /jsonapi/me route).

In addition to GET, this module also makes it easy to accept POST requests. For example, one could define a /jsonapi/user/{id}/reminders route where a new reminder entities could be created and automatically associated with a user.

You can see examples of how to define routes here.

You can find examples of the classes that respond with your custom data here.

Used in complement to the JSON:API Hypermedia module you can create powerful new decoupled behaviors. For example, you might add an applaud link to every blog post node pointing to a custom resource created by this module at /jsonapi/node/posts/{id}/applaud which uses a custom database table to store the total number of claps for a post and how many claps a particular user gave.

Project Usage
3396
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
[{"This module aims to solve the issue of defining custom JSON:API routes for providing custom collections and contextual data, as well as accepting POST requests for creating new entities and associating them with users."}]
Data Name
jsonapi_resources

OPENAI CHATBOT

OPENAI CHATBOT

14:31:43
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.