Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Designing APIs: Less Data is More

Designing APIs: Less Data is More

Often developers design APIs that expose more than is needed - unnecessary fields, redundant relationships, and endpoints that no one asked for.

These kinds of practices later on introduce communication overhead, extra maintenance costs, negative performance impacts, and waste time that could have been spent better otherwise.

We'll walk through how to design minimal APIs that are straight forward to use, and that are exactly what our consumers need!

DamirSvrtan

April 13, 2021
Tweet

More Decks by DamirSvrtan

Other Decks in Programming

Transcript

  1. Two principles for building APIs • Designing the minimal API

    surface • Designing from Strict to Loose
  2. type Post { title:String text:String reviewed:Boolean reviewers: [Reviewer] } type

    Post { title:String text:String reviewed:Boolean reviewer: Reviewer }
  3. The friendly API developer: “Let’s just give them an array

    of comments, we don’t need pagination!”
  4. The friendly API developer: “Let’s just give them an array

    of comments, we don’t need pagination yet!”