JSON REST API

Data and relations

The true power of json-rest-api lies in its sophisticated handling of relationships between resources. Unlike traditional ORMs that focus on object mapping, this library provides a fully JSON:API compliant REST interface that elegantly manages complex data relationships. This guide will walk you through defining datasets and explore all the possible relationship types available in the system.

This guide has been split into the following sections for easier navigation:

2.1 The starting point

2.2 Manipulating and searching tables with no relationships

2.3 belongsTo Relationships

2.4 hasMany records

2.5 hasMany records (polymorphic)

2.6 Many to many (hasMany with through records)

2.7 Pagination and ordering

2.8 Effects of PUT and PATCH

2.9 Relationships URLs


Back to Guide