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

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.