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
340
Django Through The Years
andrewgodwin
0
240
Writing Maintainable Software At Scale
andrewgodwin
0
470
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
370
Async, Python, and the Future
andrewgodwin
2
690
How To Break Django: With Async
andrewgodwin
1
750
Taking Django's ORM Async
andrewgodwin
0
750
The Long Road To Asynchrony
andrewgodwin
0
690
The Scientist & The Engineer
andrewgodwin
1
790
Other Decks in Programming
See All in Programming
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
11
11k
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
430
CSC509 Lecture 10
javiergs
PRO
0
170
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
440
例外処理を理解して、設計段階からエラーを見つけやすく、起こりにくく #phpconfuk
kajitack
12
5.9k
モデル駆動設計をやってみよう Modeling Forum2025ワークショップ/Let’s Try Model-Driven Design
haru860
0
140
SUZURIの規約違反チェックにおけるクリエイタフィードバックの試⾏錯誤/Trial and Error in Creator Feedback for SUZURI's Terms of Service Violation Checks
ae14watanabe
1
150
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
1
1.4k
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
130
Building AI with AI
inesmontani
PRO
0
170
モビリティSaaSにおけるデータ利活用の発展
nealle
0
160
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
230
Featured
See All Featured
Visualization
eitanlees
150
16k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Bash Introduction
62gerente
615
210k
Rails Girls Zürich Keynote
gr2m
95
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
A Tale of Four Properties
chriscoyier
162
23k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
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]