Skip to content

Drupal JSON:API

Comprehensive guide for working with Drupal's JSON:API module (core) and JSON:API Extras (contrib). Covers spec-compliant REST API with filtering, includes, pagination, and customization.

I need to...

Get Started

I need to... Guide
Understand what JSON:API is and when to use it What is JSON:API
Decide between JSON:API vs REST vs GraphQL JSON:API vs REST vs GraphQL
Understand the core architecture and components Core Architecture

Work with Resources

I need to... Guide
Understand URL structure and resource types URL Structure & Resource Types
Fetch data with GET requests Fetching Resources (GET)
Filter results by field values, operators, or groups Filtering
Include related resources and limit response fields Includes & Sparse Fieldsets
Sort results and paginate collections Sorting & Pagination

Modify Data

I need to... Guide
Create resources with POST requests Creating Resources (POST)
Update resources with PATCH requests Updating Resources (PATCH)
Delete resources Deleting Resources (DELETE)
Upload files (images, documents) File Uploads

Secure and Customize

I need to... Guide
Set up authentication (Basic, Cookie, OAuth2, JWT) Authentication Patterns
Apply security best practices for production Security Best Practices
Customize resource names, URLs, and field visibility JSON:API Extras Customization
Transform field values with enhancers Field Enhancers

Optimize and Extend

I need to... Guide
Improve API performance (caching, CDN, sparse fields) Performance Optimization
Work with revisions and translations Revisions & Translations
Find key source code files for debugging Code Reference Map
Test and debug JSON:API implementations Testing & Debugging

Reference

I need to... Guide
Check guide sources and maintenance info Sources & Maintenance