twilio
       CLOUD COMMUNICATIONS




BUILDING A GREAT API
        DECEMBER 6, 2010, CLOUDSTOCK
                          EVAN COOKE
Why make Great APIs?
  Hear about API

                    Good APIs
                     Promote
                    Adoption


    Use in production
      (tell friends)
Today’s discussion focuses
on APIs exposed by Internet
services, however, the ideas
we discuss can be applied in
      many contexts
Where Do APIs Come From?

• APIs that have grown from products
                     End Users



                Facebook
                      API
               API


                            API
Where Do APIs Come From?

• APIs that are the product
               End Users


               Developers


                Cloud API
Twilio
     Web service APIs to automate Voice and SMS
                  communications

                                       Phone
   Voice               SMS
                                      Numbers
 Inbound Calls    To/From Phone         APIs to
Outbound Calls       Numbers          Dynamically
     IVR           Short Codes      Provision Phone
                                       Numbers
Outline
1. Case Studies

2. Design

3. Presentation

4. Development
Case Studies
What NOT to Do
•   Media processing API Vendor
•   Telecom API
Media processing API

•   HTTP API to analyze large
    media files
•   Tx Rate 100,000/day
    (costly)                           Media

•   POST data to the API        You   Analysis   API

•   API synchronously returns
    analysis of media (could
    be minutes/hours later)
Media processing API

•   Control and data in the
    same request (100 MB
    every request)
•   Unclear error conditions.
    Can you resend request?      You         API
•   Synchronously wait for             ???
    response
•   No request history/billing
    information
Media processing API

1   Original Request
    POST http://api.vendor.com/API/Process?
    key=2hkh&mode=bob&filter=yeah
    Body is 100MB of binary data
Media processing API

2   Add a token allowing us to safely retry
    POST http://api.vendor.com/API/Process?
    key=2hkh&mode=bob&filter=yeah&token=TK123
    Body is 100MB of binary data
Media processing API

3   Add webhook url to asynchronously respond
    POST http://api.vendor.com/API/Process?
    key=2hkh&mode=bob&filter=yeah&token=TK123&c
    bUrl=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fmyserver.com%2Fresponse
    Body is 100MB of binary data
Media processing API

4   Async fetch media & move POST params to body
    POST http://api.vendor.com/API/Process
    Body
       key=2hkh
       mode=bob
       filter=yeah
       token=TK123
       cbUrl=http://myserver.com/response
       mediaUrl=http://s3.com/media.mov
Media processing API

5   Version API and make URL more RESTful
    POST http://api.vendor.com/v1/Media
    Body
       key=2hkh
       mode=bob
       filter=yeah
       token=TK123
       cbUrl=http://myserver.com/response
       mediaUrl=http://s3.com/media.mov
    Response
       URI http://api.vendor.com/v1/Media/MD123
What NOT to Do
•   Media processing API Vendor
•   Telecom API
Telecom API

•   API to manage phone numbers
•   Documentation is 300 page PDF,
    pages of WSDL
•   95% useless RPC functions that
    expose internal business logic
•   No simple way to get started
•   No helper libraries
Design
Key Ideas
•   Idempotency
•   Self-documenting
•   RESTfulness
•   Versioning
•   Statefulness
•   Predictability
•   Sync vs. Async
Idempotency
• Idempotence is the property of certain
  operations that they can be applied multiple
  times without changing the result.
• Request failures happen. Provide users a
  safe way to retry requests
• Example:
POST /BankAccount/AddFunds
{‘value’: 1000, ‘token’: ‘TX123’}
Self-documenting
• Sweat what and how you name. Naming is
  is the best documentation.
• Example:
GET /Users/ID123
GET /Users/ID123/Friends
GET /Users/ID123/Photos
RESTfulness
• Adherence to REST object model and
  verbs provides a clean way to expose
  business logic
• Create POST          /Users

• Fetch GET            /Users/ID123
• Modify PUT/POST      /Users/ID123
• Remove DELETE        /Users/ID123
Versioning
• Do it. Remember you will be stuck
  supporting old API versions (indefinitely?)
• Examples
  GET /api/v1/blag
  GET /api/20101206/blag
Statefulness
• When possible, offload the work of keeping
  state/history because it’s hard!
• Examples
POST /Calls
GET /Calls/CA123
GET /Calls/CA123/Recordings/RE123
Predictability
• The API should do what users expect
• Examples
  <Play>music.mp3</Play>
  <Play>music.aiff</Play>
Sync vs Async
• When a response is available immediately,
  use a synchronous response. Otherwise,
  consider an asynchronous Webhook rather
  then polling
• Examples:
POST /Object/Transforms
Body
  cbUrl=http://b.com/response
Presentation
Great APIs
•   Redis - Key/Value, List, and Set Persistence
•   Dropbox - REST, iOS/Android File Mgnt
•   Wufoo - Web forms

                     Other Notable APIs
     SimpleGeo, Github, Posterous, Tumblr,
     Facebook... great, but getting to their docs requires
     authenticating!
Redis
•   Simple, well
    named API calls
•   Powerful
•   APIs that cover
    major operational
    tasks
Dropbox
•   API support
    across platforms/
    languages
•   Community
    integration
Wufoo
• Simple well-
  documented
  REST API
• Good use of
  HTTP verbs
  and errors
What makes a Good API?
 • Easy to Learn
 • Easy to use (even without documentation)
 • Hard to Misuse
 • Easy to read and maintain code that uses it
 • Sufficiently powerful to satisfy requirements
 • Easy to extend
 • Appropriate to audience
                     How to Design a Good API and Why it Matters
                     Joshua Block, Google
Easy to Learn
Easy to Use
Easy to read/maintain code


            HTTP/XML/JSON
               REST         Customer


  Telecom                   Business
    Goo                      Logic
Sufficiently
            Powerful
It sure helps to write code live if you are pitching to
developers. John got a big nod from the audience for doing
that.

But the important point is that when you show your product
live in front of people, they can get what you are doing way
faster than working through a bunch of slides. Kudos to John
for an excellent pitch. Apparently Business Insider called it
"the best demo we've ever seen.
Easy to extend



            Expose Twilio
         in an async evented
                model
Development
Twilio Process
1. Customers Feedback
2. Documentation
3. Team feedback (back to 2)
4. Prototype (2-3 weeks)
5. Alpha customers
6. Preview Customers
7. General Release
Design
  Idempotent, self-documenting, RESTful,
  versioned, stateful, predictable, sync/async

Presentation
  Easy to learn, easy to use, easy to read and
  maintainable, sufficiently powerful, easy to extend

Development
  Customers, documentation, team, prototype,
  alpha customers, preview customers, release
Be Simple
twilio
http://www.twilio.com
      @emcooke

More Related Content

PPTX
REST API
PPTX
Introduction to GraphQL
PPTX
Rest api and-crud-api
PPTX
Design Patterns: From STUPID to SOLID code
PDF
Automação de testes de API utilizando Postman
PPTX
Api testing
PPTX
Rest & RESTful WebServices
PDF
Testes de Integração
REST API
Introduction to GraphQL
Rest api and-crud-api
Design Patterns: From STUPID to SOLID code
Automação de testes de API utilizando Postman
Api testing
Rest & RESTful WebServices
Testes de Integração

What's hot (20)

PPT
Graphql presentation
PDF
API Testing: The heart of functional testing" with Bj Rollison
ODP
Testing RESTful Webservices using the REST-assured framework
PDF
Introduction to GraphQL
PDF
Test Automation Architecture
PPTX
introduction about REST API
PPTX
Introducing OpenAPI Version 3.1
PPTX
An intro to GraphQL
PDF
What is REST API? REST API Concepts and Examples | Edureka
PDF
Spark and Spark Streaming at Netfix-(Kedar Sedekar and Monal Daxini, Netflix)
PDF
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
PDF
From Mainframe to Microservice: An Introduction to Distributed Systems
PPTX
Api Testing
PPTX
Sonatype nexus 로 docker registry 관리하기
PDF
Intro à Graphql
PDF
Cloud arch patterns
PDF
Intro to GraphQL
ODP
Attacking REST API
PDF
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
PDF
Robot Framework :: Demo login application
Graphql presentation
API Testing: The heart of functional testing" with Bj Rollison
Testing RESTful Webservices using the REST-assured framework
Introduction to GraphQL
Test Automation Architecture
introduction about REST API
Introducing OpenAPI Version 3.1
An intro to GraphQL
What is REST API? REST API Concepts and Examples | Edureka
Spark and Spark Streaming at Netfix-(Kedar Sedekar and Monal Daxini, Netflix)
Event Streaming with Kafka Streams and Spring Cloud Stream | Soby Chacko, VMware
From Mainframe to Microservice: An Introduction to Distributed Systems
Api Testing
Sonatype nexus 로 docker registry 관리하기
Intro à Graphql
Cloud arch patterns
Intro to GraphQL
Attacking REST API
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Robot Framework :: Demo login application

Viewers also liked (19)

PDF
Programming Language Selection
PDF
Twilio Presents at PariSoMa
PDF
Twilio at the Google App Engine Meetup 2009-10
PDF
Twilio - Monetizing SaaS - Jeff Lawson Cloudstock December 2010
PDF
Twilio SMS - API for Sending & Receiving SMS Messages
PDF
"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk
PDF
DevSecOps - The big picture
KEY
2012: Putting your robots to work: security automation at Twitter
PDF
Building a Great Web API - Evan Cooke - QCON 2011
PDF
John sheehan of twillio gives cloud camp denver lightning talk
PDF
Twilio Contact Center Overview
PDF
How To Track Calls Using Twilio?
PDF
Twilio Web Service API for building Voice Applications
PDF
What Can You Do With Twilio
PDF
DevSecOps in Baby Steps
PDF
Application Security at DevOps Speed - DevOpsDays Singapore 2016
PDF
Integrating DevOps and Security
PDF
DevSecCon Asia 2017 Fabian Lim: DevSecOps in the government
PPTX
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
Programming Language Selection
Twilio Presents at PariSoMa
Twilio at the Google App Engine Meetup 2009-10
Twilio - Monetizing SaaS - Jeff Lawson Cloudstock December 2010
Twilio SMS - API for Sending & Receiving SMS Messages
"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk
DevSecOps - The big picture
2012: Putting your robots to work: security automation at Twitter
Building a Great Web API - Evan Cooke - QCON 2011
John sheehan of twillio gives cloud camp denver lightning talk
Twilio Contact Center Overview
How To Track Calls Using Twilio?
Twilio Web Service API for building Voice Applications
What Can You Do With Twilio
DevSecOps in Baby Steps
Application Security at DevOps Speed - DevOpsDays Singapore 2016
Integrating DevOps and Security
DevSecCon Asia 2017 Fabian Lim: DevSecOps in the government
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...

Similar to Building A Great API - Evan Cooke, Cloudstock, December 2010 (20)

PDF
Consumer centric api design v0.4.0
PPTX
More Coverage, Better Diagnostics
PPTX
Trends in Web APIs Layer 7 API Management Workshop London
PDF
Past, Present and Future of APIs of Mobile and Web Apps
PDF
API Introduction - API Management Workshop Munich from Ronnie Mitra
PDF
A_Complete_Guide_to_API_Development.pdf
PDF
Designing Usable APIs featuring Forrester Research, Inc.
PDF
7 Principles of API Design - Waza
PDF
"API Design: From User Need to Finished Spec" by Andrew Jordan, ex-Product @T...
PDF
API Workshop Amsterdam presented by API Architect Ronnie Mitra
PDF
The ultimate api checklist by Blendr.io
PDF
apidays LIVE London 2021 - Moving from a Product as API to API as a Product b...
PPTX
Building a REST API for Longevity
PDF
Open Ap Is State Of The Market
PDF
Approaching APIs
PDF
Be My API How to Implement an API Strategy Everyone will Love
PPTX
Api design part 1
PDF
The API Opportunity: Crossing the Digital Divide
PDF
JOSA TechTalks - RESTful API Concepts and Best Practices
PDF
What Makes a Great Open API?
Consumer centric api design v0.4.0
More Coverage, Better Diagnostics
Trends in Web APIs Layer 7 API Management Workshop London
Past, Present and Future of APIs of Mobile and Web Apps
API Introduction - API Management Workshop Munich from Ronnie Mitra
A_Complete_Guide_to_API_Development.pdf
Designing Usable APIs featuring Forrester Research, Inc.
7 Principles of API Design - Waza
"API Design: From User Need to Finished Spec" by Andrew Jordan, ex-Product @T...
API Workshop Amsterdam presented by API Architect Ronnie Mitra
The ultimate api checklist by Blendr.io
apidays LIVE London 2021 - Moving from a Product as API to API as a Product b...
Building a REST API for Longevity
Open Ap Is State Of The Market
Approaching APIs
Be My API How to Implement an API Strategy Everyone will Love
Api design part 1
The API Opportunity: Crossing the Digital Divide
JOSA TechTalks - RESTful API Concepts and Best Practices
What Makes a Great Open API?

More from Twilio Inc (20)

PDF
Building Blocks for Next Generation Contact Centers
PDF
Create an IVR that Keeps Up with Your Customers
PDF
Salesforce’s Andy Kung on the Power of CRM Integrations
PPTX
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
PDF
Why Mobile Messaging Works?
PDF
Understand How Consumers Use Messaging
PDF
Twilio Signal 2016 WebRTC Reborn
PDF
Twilio Signal 2016 Using Add-ons
PDF
Twilio Signal 2016 Technical Blogging
PDF
Twilio Signal 2016 Serverless Contact Center
PDF
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
PDF
Twilio Signal 2016 Leading An Open Hardware Revolution
PDF
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
PDF
Twilio Signal 2016 Chaos Patterns
PPTX
Twilio Signal 2016 How to Impact Non-profits
PDF
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
PDF
Twilio Signal 2016 Listing Services and Lead Generation
PDF
Twilio Signal 2016 Bots
PDF
Twilio Signal 2016 Taking Your SMS App Global
PDF
Twilio Signal 2016 Real-time Communications Overview
Building Blocks for Next Generation Contact Centers
Create an IVR that Keeps Up with Your Customers
Salesforce’s Andy Kung on the Power of CRM Integrations
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
Why Mobile Messaging Works?
Understand How Consumers Use Messaging
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 Chaos Patterns
Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Bots
Twilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Real-time Communications Overview

Recently uploaded (20)

PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
MuleSoft-Compete-Deck for midddleware integrations
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PPTX
Configure Apache Mutual Authentication
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Advancing precision in air quality forecasting through machine learning integ...
DOCX
search engine optimization ppt fir known well about this
Improvisation in detection of pomegranate leaf disease using transfer learni...
Auditboard EB SOX Playbook 2023 edition.
Convolutional neural network based encoder-decoder for efficient real-time ob...
Statistics on Ai - sourced from AIPRM.pdf
sbt 2.0: go big (Scala Days 2025 edition)
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
MuleSoft-Compete-Deck for midddleware integrations
Basics of Cloud Computing - Cloud Ecosystem
Rapid Prototyping: A lecture on prototyping techniques for interface design
Configure Apache Mutual Authentication
The influence of sentiment analysis in enhancing early warning system model f...
4 layer Arch & Reference Arch of IoT.pdf
Data Virtualization in Action: Scaling APIs and Apps with FME
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
Flame analysis and combustion estimation using large language and vision assi...
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Advancing precision in air quality forecasting through machine learning integ...
search engine optimization ppt fir known well about this

Building A Great API - Evan Cooke, Cloudstock, December 2010

  • 1. twilio CLOUD COMMUNICATIONS BUILDING A GREAT API DECEMBER 6, 2010, CLOUDSTOCK EVAN COOKE
  • 2. Why make Great APIs? Hear about API Good APIs Promote Adoption Use in production (tell friends)
  • 3. Today’s discussion focuses on APIs exposed by Internet services, however, the ideas we discuss can be applied in many contexts
  • 4. Where Do APIs Come From? • APIs that have grown from products End Users Facebook API API API
  • 5. Where Do APIs Come From? • APIs that are the product End Users Developers Cloud API
  • 6. Twilio Web service APIs to automate Voice and SMS communications Phone Voice SMS Numbers Inbound Calls To/From Phone APIs to Outbound Calls Numbers Dynamically IVR Short Codes Provision Phone Numbers
  • 7. Outline 1. Case Studies 2. Design 3. Presentation 4. Development
  • 9. What NOT to Do • Media processing API Vendor • Telecom API
  • 10. Media processing API • HTTP API to analyze large media files • Tx Rate 100,000/day (costly) Media • POST data to the API You Analysis API • API synchronously returns analysis of media (could be minutes/hours later)
  • 11. Media processing API • Control and data in the same request (100 MB every request) • Unclear error conditions. Can you resend request? You API • Synchronously wait for ??? response • No request history/billing information
  • 12. Media processing API 1 Original Request POST http://api.vendor.com/API/Process? key=2hkh&mode=bob&filter=yeah Body is 100MB of binary data
  • 13. Media processing API 2 Add a token allowing us to safely retry POST http://api.vendor.com/API/Process? key=2hkh&mode=bob&filter=yeah&token=TK123 Body is 100MB of binary data
  • 14. Media processing API 3 Add webhook url to asynchronously respond POST http://api.vendor.com/API/Process? key=2hkh&mode=bob&filter=yeah&token=TK123&c bUrl=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttp%2Fmyserver.com%2Fresponse Body is 100MB of binary data
  • 15. Media processing API 4 Async fetch media & move POST params to body POST http://api.vendor.com/API/Process Body key=2hkh mode=bob filter=yeah token=TK123 cbUrl=http://myserver.com/response mediaUrl=http://s3.com/media.mov
  • 16. Media processing API 5 Version API and make URL more RESTful POST http://api.vendor.com/v1/Media Body key=2hkh mode=bob filter=yeah token=TK123 cbUrl=http://myserver.com/response mediaUrl=http://s3.com/media.mov Response URI http://api.vendor.com/v1/Media/MD123
  • 17. What NOT to Do • Media processing API Vendor • Telecom API
  • 18. Telecom API • API to manage phone numbers • Documentation is 300 page PDF, pages of WSDL • 95% useless RPC functions that expose internal business logic • No simple way to get started • No helper libraries
  • 20. Key Ideas • Idempotency • Self-documenting • RESTfulness • Versioning • Statefulness • Predictability • Sync vs. Async
  • 21. Idempotency • Idempotence is the property of certain operations that they can be applied multiple times without changing the result. • Request failures happen. Provide users a safe way to retry requests • Example: POST /BankAccount/AddFunds {‘value’: 1000, ‘token’: ‘TX123’}
  • 22. Self-documenting • Sweat what and how you name. Naming is is the best documentation. • Example: GET /Users/ID123 GET /Users/ID123/Friends GET /Users/ID123/Photos
  • 23. RESTfulness • Adherence to REST object model and verbs provides a clean way to expose business logic • Create POST /Users • Fetch GET /Users/ID123 • Modify PUT/POST /Users/ID123 • Remove DELETE /Users/ID123
  • 24. Versioning • Do it. Remember you will be stuck supporting old API versions (indefinitely?) • Examples GET /api/v1/blag GET /api/20101206/blag
  • 25. Statefulness • When possible, offload the work of keeping state/history because it’s hard! • Examples POST /Calls GET /Calls/CA123 GET /Calls/CA123/Recordings/RE123
  • 26. Predictability • The API should do what users expect • Examples <Play>music.mp3</Play> <Play>music.aiff</Play>
  • 27. Sync vs Async • When a response is available immediately, use a synchronous response. Otherwise, consider an asynchronous Webhook rather then polling • Examples: POST /Object/Transforms Body cbUrl=http://b.com/response
  • 29. Great APIs • Redis - Key/Value, List, and Set Persistence • Dropbox - REST, iOS/Android File Mgnt • Wufoo - Web forms Other Notable APIs SimpleGeo, Github, Posterous, Tumblr, Facebook... great, but getting to their docs requires authenticating!
  • 30. Redis • Simple, well named API calls • Powerful • APIs that cover major operational tasks
  • 31. Dropbox • API support across platforms/ languages • Community integration
  • 32. Wufoo • Simple well- documented REST API • Good use of HTTP verbs and errors
  • 33. What makes a Good API? • Easy to Learn • Easy to use (even without documentation) • Hard to Misuse • Easy to read and maintain code that uses it • Sufficiently powerful to satisfy requirements • Easy to extend • Appropriate to audience How to Design a Good API and Why it Matters Joshua Block, Google
  • 36. Easy to read/maintain code HTTP/XML/JSON REST Customer Telecom Business Goo Logic
  • 37. Sufficiently Powerful It sure helps to write code live if you are pitching to developers. John got a big nod from the audience for doing that. But the important point is that when you show your product live in front of people, they can get what you are doing way faster than working through a bunch of slides. Kudos to John for an excellent pitch. Apparently Business Insider called it "the best demo we've ever seen.
  • 38. Easy to extend Expose Twilio in an async evented model
  • 40. Twilio Process 1. Customers Feedback 2. Documentation 3. Team feedback (back to 2) 4. Prototype (2-3 weeks) 5. Alpha customers 6. Preview Customers 7. General Release
  • 41. Design Idempotent, self-documenting, RESTful, versioned, stateful, predictable, sync/async Presentation Easy to learn, easy to use, easy to read and maintainable, sufficiently powerful, easy to extend Development Customers, documentation, team, prototype, alpha customers, preview customers, release