Skip to Content
API Design Patterns
book

API Design Patterns

by John J. Geewax
July 2021
Intermediate to advanced
480 pages
14h 40m
English
Manning Publications
Content preview from API Design Patterns

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Designing Web APIs

Designing Web APIs

Brenda Jin, Saurabh Sahni, Amir Shevat

Publisher Resources

ISBN: 9781617295850Publisher SupportOtherPublisher WebsiteErrata PagePurchase Link