4 Resource scope and hierarchy
This chapter covers
- What a resource layout is
- The various types of resource relationships (reference, many-to-many, etc.)
- How entity relationship diagrams describe resource layout
- How to choose the right relationship between resources
- Resource layout anti-patterns to be avoided
As we learned in chapter 1, shifting our focus away from actions and toward resources allows us to more easily and more quickly build our familiarity of an API by leveraging simple patterns. For example, REST provides a set of standard verbs we can apply to a bunch of resources, meaning that for every resource we learn about, we also pick up five different actions that can be performed on that resource (create, get, list, delete, and ...
Get API Design Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.