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
360
Django Through The Years
andrewgodwin
0
280
Writing Maintainable Software At Scale
andrewgodwin
0
490
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
390
Async, Python, and the Future
andrewgodwin
2
710
How To Break Django: With Async
andrewgodwin
1
770
Taking Django's ORM Async
andrewgodwin
0
770
The Long Road To Asynchrony
andrewgodwin
0
740
The Scientist & The Engineer
andrewgodwin
1
810
Other Decks in Programming
See All in Programming
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
CSC307 Lecture 06
javiergs
PRO
0
680
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
570
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Fluid Templating in TYPO3 14
s2b
0
130
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
120
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
AI巻き込み型コードレビューのススメ
nealle
1
230
AI & Enginnering
codelynx
0
110
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.3k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
64
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Language of Interfaces
destraynor
162
26k
Ethics towards AI in product and experience design
skipperchong
2
190
Fireside Chat
paigeccino
41
3.8k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
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]