About tutorials

Tutorials are pointers to other documentation resources. They are an aggregation of all the community documentation regarding decoupled architectures. You will find here a wide variety of documentation topics, from the JSON API server to the OAuth2 authentication, schema generation, and hand picked blog posts. If you want to suggest adding a new tutorial to this unstructured list, please open an issue on the GitHub issue queue.


Contenta Makes Your Content Happy
Contenta is a Drupal distribution that gives you modern API capabilities out-of-the box with JSON API, which amongst other features allows you to fetch nested resources in one request. It’s ready to feed content to your JavaScript powered website, phone app, TV, or even the mythical fridge application.
The Hidden Costs of Decoupling
Decoupled Drupal has been well understood at a technical level for many years now. While the implementation details vary, most Drupal teams can handle working on decoupled projects. However, we’ve heard the following from many of our clients
Should you Decouple?
One of the major topics of discussion in the Drupal community has been decoupled (or headless) Drupal. Depending on who you ask, it’s either the best way to build break-through user experiences, or nothing short of a pandemic. But what exactly is a decoupled architecture?
The 3 C's + the 1 D of Drupal: Why Decoupled Matters
Decoupled has been in place for a few years, but the Open Source and Drupal community are really beginning to rally around it, as evidenced by more than 100 professionals gathering in NYC last weekend at 30 Rock.


Introduction to OAuth2
Quick review and understanding of OAuth2.
Installation and set up
Learn how to install and configure the Simple OAuth module.
Password Grant
Authenticate requests using the password grant.
OAuth 2 Scopes and Drupal Roles
OAuth2 grants are represented as Drupal roles. Learn how those work.
Refresh Token Grant
Generate a new valid token when it expires by refreshing it.
Client Credentials Grant
Authenticate requests using the client credentials grant.
Authorization Code Grant
Authenticate requests using the authorization code grant.
Implicit Grant
Authenticate requests using the implicit grant.


Incredible Decoupled Performance with Subrequests
In my previous post, Modern Decoupling is More Performant, we discussed how saving HTTP round-trips has a very positive impact on performance. In particular, we demonstrated how the JSON API module could help your application by returning multiple entities in a single request. Doing so eliminates the need for making an individual request per entity.
Subrequests Specification
Specification for the Subrequests project.


Translation Support
You can access natively the different translations of a content entity using JSON API.
Removing Records
When you need to remove content from Drupal using JSON API you can use the DELETE method.
Request a Node
Request a single node by UUID using the JSON API module. This tutorial explains the basics of JSON API requests.
The JSON API output
Understand all of the parts in the output of a JSON API response: resource object, attributes, relationships and metadata.
Working with Relationships
Relationships in JSON API allow you to reference related pieces of content. This video describes how to interact with relationships in JSON API
Collections are the best way to get a listing of entities for a particular resource. They are the alternative to Views in the decoupled world.
Filters for Collections
Add constraints to the items you get back from your collections. You can execute any Entity Query as a JSON API filter, but you will need to learn the syntax.
Sparse Fieldsets
If you are getting too much data back from the JSON API server, then you can benefit greatly from using sparse fieldsets.
Embedded Resources
This is the most important feature of JSON API. Avoid multiple requests to Drupal by choosing what related entities to embed in your response.
Nested Filters
Nested filters are useful when you want to find content based on the values of the attributes in the related entities. They take the filters to a new level.
Relation Endpoints
JSON API comes with two extra endpoints to make it easier to deal with relationship. The related and the relationship endpoints will help with your relationship operations.
Sorting Responses
Sort the results of a collection. It is also useful to find the first or last elements based on a sort criteria.
Creating New Records
Learn to use the POST method if you need to create new records using JSON API. Write operations are typically available only to authenticated users.
Updating Records
The PATCH method can be used to alter existing entities in the Drupal backend. Write operations are typically available only to authenticated users.