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

8 Partial updates and retrievals

This chapter covers

  • Why we might want to update or retrieve only specific pieces of a resource
  • How best to communicate the fields of interest to the API service
  • How to handle individual items in complex fields, such as maps and interfaces
  • Whether to support addressing individual items in a repeated field (e.g., arrays)
  • Defining default values and handling implicit field masks
  • How to deal with invalid field specifications

As we learned in chapter 7, it’s important that we have the ability to update resources in piecemeal fashion rather than always relying on full replacement. In this pattern, we explore using field masks as a tool to update only the specific fields we’re interested in for a given resource. ...

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