Why should I use include?



I’m currently building an API following the jsonApi spec and I’m struggle with the include keyword.
What’s the differences between getting related ressources using the include keyword and getting related related ressources following the relationships links.


The basic tradeoff is:

  • If you use include, you only make one request, but your response is
  • If you don’t use include, you make multiple requests, but each response
    is smaller.

Whichever is better is up to you, and may even vary within a single

Hope that helps.


That helps ^^, thanks a lot.