Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
API Design at Eventbrite
Search
Andrew Godwin
April 10, 2014
Programming
2
2.6k
API Design at Eventbrite
A short talk given as part of the Eventbrite "Advanced Django" workshop at Pycon 2014
Andrew Godwin
April 10, 2014
Tweet
Share
More Decks by Andrew Godwin
See All by Andrew Godwin
Reconciling Everything
andrewgodwin
1
330
Django Through The Years
andrewgodwin
0
220
Writing Maintainable Software At Scale
andrewgodwin
0
460
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
370
Async, Python, and the Future
andrewgodwin
2
680
How To Break Django: With Async
andrewgodwin
1
740
Taking Django's ORM Async
andrewgodwin
0
740
The Long Road To Asynchrony
andrewgodwin
0
680
The Scientist & The Engineer
andrewgodwin
1
790
Other Decks in Programming
See All in Programming
Go Conference 2025: Goで体感するMultipath TCP ― Go 1.24 時代の MPTCP Listener を理解する
takehaya
9
1.7k
CSC509 Lecture 04
javiergs
PRO
0
300
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
Introduce Hono CLI
yusukebe
6
2.6k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
450
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
850
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
310
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
1.3k
Software Architecture
hschwentner
6
2.3k
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
210
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
410
XP, Testing and ninja testing ZOZ5
m_seki
3
700
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
173
14k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
GitHub's CSS Performance
jonrohan
1032
470k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Statistics for Hackers
jakevdp
799
220k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Documentation Writing (for coders)
carmenintech
75
5.1k
Faster Mobile Websites
deanohume
310
31k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
What's in a price? How to price your products and services
michaelherold
246
12k
Transcript
API Design at Andrew Godwin @andrewgodwin
The Problem
Two existing APIs: APIv1 at least 6 years old APIv2
never finished and now too specialised
Outdated: No provision for new features Some interfaces locked down
to old ideas (e.g. payment)
Bad patterns: Same domain as main site /xml/?method=access_code_new Both XML
and JSON as return formats, transformed from each other.
The Task Build a new API for the modern era
SOA Match it as closely as possible
Event service Venue service Order service Payment service SOA Client
Event service Venue service Order service Payment service SOA Client
APIv3 API Client
Future-proof Allow for more features easily
Maintainable Make sure it's easier to extend than start again
The Basis
The Basis Django REST Framework
The Basis Django REST Framework Custom SOA/API coupling
The Basis Django REST Framework Custom SOA/API coupling Piecemeal refactors
of current code
The Basis Django REST Framework Custom SOA/API coupling Piecemeal refactors
of current code APIv1 as initial target to start deprecation
Design Principles
JSON only Mapping XML ←→ JSON rarely works well
REST (ish) Sensible paths, sensible verbs
/events/ /events/39992/ /events/39992/orders/ /events/39992/publish/ /users/me/owned_events/ POST: New event GET: Event
details POST: Update event GET: List of orders /events/39992/orders/12392/ GET: Order details POST: Publish event GET: List of your events DELETE: Delete event
Every response is {} Leaves room for new features/pagination
Pagination everywhere And standardised, so there's no surprises
Introspectable parameters For our documentation and API explorer
None
None
Always more to do Documentation, consistency, and new features
Try it today! http://developer.eventbrite.com
Thanks. @andrewgodwin
[email protected]