JSON REST API guide
Use JSON REST API as a mini-ORM through resource methods, or expose the same resources over HTTP. Start with chapters 01–04, then follow the relationship tutorials or jump to the contract you need. Each runnable chapter uses a fresh database unless it explicitly says otherwise.
Upgrading an application? Start with 33. Migrating to v2. Before choosing storage, read 30. Backend capabilities and limits.
The examples require Node.js 24 or newer and familiarity with JavaScript and npm. Development verification targets Node 24.
Getting started
- 01. Getting started
- 02. Resources and relationships
- 03. Running example
- 04. Creating and querying records
Relationships and queries
- 05. Belongs-to relationships
- 06. Has-many relationships
- 07. Polymorphic relationships
- 08. Many-to-many relationships
- 09. Pagination and sorting
- 10. PUT and PATCH
- 11. Relationship endpoints
Resource behavior
- 12. Field transformations
- 13. Hooks and lifecycle
- 14. Custom resource methods
- 15. Query projections
- 16. Autofiltering
- 17. Row policies
- 18. Labels
Transactions and schema
- 19. Managed transactions
- 20. Transaction outcomes
- 21. Schema and migrations
- 22. Version-field migrations
Transports and extensions
- 23. Fastify integration
- 24. CORS
- 25. URL management
- 26. File uploads
- 27. Bulk operations
- 28. Socket.IO integration
- 29. Writing plugins