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
280
Django Through The Years
andrewgodwin
0
180
Writing Maintainable Software At Scale
andrewgodwin
0
420
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
330
Async, Python, and the Future
andrewgodwin
2
630
How To Break Django: With Async
andrewgodwin
1
700
Taking Django's ORM Async
andrewgodwin
0
700
The Long Road To Asynchrony
andrewgodwin
0
620
The Scientist & The Engineer
andrewgodwin
1
730
Other Decks in Programming
See All in Programming
Go1.24で testing.B.Loopが爆誕
kuro_kurorrr
0
140
RCPと宣言型ポリシーについてのお話し
kokitamura
2
130
体得しよう!RSA暗号の原理と解読
laysakura
3
490
いまさら聞けない生成AI入門: 「生成AIを高速キャッチアップ」
soh9834
11
3.2k
RubyKaigiで手に入れた HHKB Studioのための HIDRawドライバ
iberianpig
0
170
Denoでフロントエンド開発 2025年春版 / Frontend Development with Deno (Spring 2025)
petamoriken
1
1.3k
AI Agentを利用したAndroid開発について
yuchan2215
0
190
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
720
複数ドメインに散らばってしまった画像…! 運用中のPHPアプリに後からCDNを導入する…!
suguruooki
0
400
Develop Faster With FrankenPHP
dunglas
1
1.4k
RailsでCQRS/ESをやってみたきづき
suzukimar
2
1.4k
ステートソーシング型イベント駆動の視点で捉えるCQRS+ES
shinnosuke0522
1
300
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
460
The Invisible Side of Design
smashingmag
299
50k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Side Projects
sachag
452
42k
Unsuck your backbone
ammeep
669
57k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
490
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Building an army of robots
kneath
304
45k
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 andrewgodwin@eventbrite.com