Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Three simple rules for building APIs
Ben Balter
March 31, 2015
Technology
1
250
Three simple rules for building APIs
APIs should be simple, semantic, and supported.
Ben Balter
March 31, 2015
Tweet
Share
More Decks by Ben Balter
See All by Ben Balter
benbalter
0
550
benbalter
0
84
benbalter
1
85
benbalter
1
190
benbalter
0
50
benbalter
0
190
benbalter
2
210
benbalter
3
1.4k
benbalter
0
90
Other Decks in Technology
See All in Technology
yasuakiomokawa
0
330
tdys13
4
3.4k
noir_neo
0
130
y0hgi
1
370
cmwatanabeseigo
0
330
awsbelaraby
4
1.2k
harshbothra
0
110
pinboro
0
2k
yosuke_matsuura
PRO
0
3.3k
oracle4engineer
1
210
torisoup
0
270
sasakendayo
2
360
Featured
See All Featured
qrush
285
18k
holman
288
130k
tammielis
237
23k
keavy
106
14k
jacobian
255
20k
lauravandoore
11
1.2k
denniskardys
220
120k
erikaheidi
13
4.2k
marcelosomers
220
15k
philnash
8
490
morganepeng
17
1.1k
jeffersonlam
328
15k
Transcript
! Three simple rules for building an API Ben Balter
@benbalter government@github.com government.github.com
! All APIs should be three things
! APIs should be simple
! APIs should be semantic
! APIs should be supported
! All APIs should be simple
! Let’s say you want a list of open source
licenses…
! Option 0: scrape opensource.org Option 1: scrape spdx.org Option
2: parce an excel file
! Pro-tip: prototype your API
! choosealicense.com/licenses.json
! Meh.
! api.github.com/licenses
None
! api.github.com/licenses/mit
None
! api.github.com/repos/benbalter/gman
None
! All APIs should be semantic
! FDsys is not
! The FAR
! (Thunder and dramatic music)
None
! Web developers love 2+ MB XML files
! Data should be immediately valuable
! github.com/benbalter/so_far_so_good
! Data should make sense to computers
None
! Data should make sense to humans
None
! Data shouldn’t mimic their paper counterparts
! Data should be reimagined for the web
! Optimize for developer happiness
! All APIs should be supported
! data@agency.gov doesn’t scale
! data@agency.gov is a great way to answer the same
question over and over again
! Users have (the same) questions
! The only appropriate way to answer a question about
your API is with a URL
! Today, the first step to solving any problem is
to Google it
! Microsoft has been rocking the knowledge base for decades
! Bonus #1: Your community will answer its own questions
None
! Bonus #2: Collaborative documentation
None
None
! If you liked it then you should have put
a URL on it
! To review…
! APIs should be simple
! APIs should be semantic
! APIs should be supported
! Three simple rules for building an API Ben Balter
@benbalter government@github.com government.github.com