SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
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=http%3A%2F%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

Contenu connexe

Tendances

Tendances (20)

Restful api design
Restful api designRestful api design
Restful api design
 
Apple iOS Introduction
Apple iOS IntroductionApple iOS Introduction
Apple iOS Introduction
 
What Makes a Great Open API?
What Makes a Great Open API?What Makes a Great Open API?
What Makes a Great Open API?
 
PPT on iOS
PPT on iOS PPT on iOS
PPT on iOS
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
How to submit ios app in Appstore
How to submit ios app in AppstoreHow to submit ios app in Appstore
How to submit ios app in Appstore
 
Window Phone
Window PhoneWindow Phone
Window Phone
 
PHP 와 MySQL을 이용한 게임 랭킹 구축하기
PHP 와 MySQL을 이용한 게임 랭킹 구축하기PHP 와 MySQL을 이용한 게임 랭킹 구축하기
PHP 와 MySQL을 이용한 게임 랭킹 구축하기
 
Android Platform Architecture
Android Platform ArchitectureAndroid Platform Architecture
Android Platform Architecture
 
Web-App Remote Code Execution Via Scripting Engines
Web-App Remote Code Execution Via Scripting EnginesWeb-App Remote Code Execution Via Scripting Engines
Web-App Remote Code Execution Via Scripting Engines
 
Intro to WebSockets
Intro to WebSocketsIntro to WebSockets
Intro to WebSockets
 
iOS PPT
iOS PPTiOS PPT
iOS PPT
 
Appium an introduction
Appium   an introductionAppium   an introduction
Appium an introduction
 
Android vs iOS
Android vs iOSAndroid vs iOS
Android vs iOS
 
Kotlin Multiplatform
Kotlin MultiplatformKotlin Multiplatform
Kotlin Multiplatform
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Equilibrio chimico e cinetica di reazione (parte I°)
Equilibrio chimico e cinetica di reazione (parte I°)Equilibrio chimico e cinetica di reazione (parte I°)
Equilibrio chimico e cinetica di reazione (parte I°)
 
Api presentation
Api presentationApi presentation
Api presentation
 
Remote File Inclusion (RFI) Vulnerabilities 101
Remote File Inclusion (RFI) Vulnerabilities 101Remote File Inclusion (RFI) Vulnerabilities 101
Remote File Inclusion (RFI) Vulnerabilities 101
 
Presentation on iOS
Presentation on iOSPresentation on iOS
Presentation on iOS
 

En vedette

Programming Language Selection
Programming Language SelectionProgramming Language Selection
Programming Language SelectionDhananjay Nene
 
Twilio Presents at PariSoMa
Twilio Presents at PariSoMaTwilio Presents at PariSoMa
Twilio Presents at PariSoMaTwilio Inc
 
Twilio at the Google App Engine Meetup 2009-10
Twilio at the Google App Engine Meetup 2009-10Twilio at the Google App Engine Meetup 2009-10
Twilio at the Google App Engine Meetup 2009-10Twilio Inc
 
Twilio - Monetizing SaaS - Jeff Lawson Cloudstock December 2010
Twilio - Monetizing SaaS - Jeff Lawson Cloudstock December 2010Twilio - Monetizing SaaS - Jeff Lawson Cloudstock December 2010
Twilio - Monetizing SaaS - Jeff Lawson Cloudstock December 2010Twilio Inc
 
Twilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS MessagesTwilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS MessagesTwilio Inc
 
"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk
"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk
"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talkTwilio Inc
 
DevSecOps - The big picture
DevSecOps - The big pictureDevSecOps - The big picture
DevSecOps - The big pictureDevSecOpsSg
 
2012: Putting your robots to work: security automation at Twitter
2012: Putting your robots to work: security automation at Twitter2012: Putting your robots to work: security automation at Twitter
2012: Putting your robots to work: security automation at TwitterNeil Matatall
 
Building a Great Web API - Evan Cooke - QCON 2011
Building a Great Web API - Evan Cooke - QCON 2011Building a Great Web API - Evan Cooke - QCON 2011
Building a Great Web API - Evan Cooke - QCON 2011Twilio Inc
 
John sheehan of twillio gives cloud camp denver lightning talk
John sheehan of twillio gives cloud camp denver lightning talkJohn sheehan of twillio gives cloud camp denver lightning talk
John sheehan of twillio gives cloud camp denver lightning talkIntel Corporation
 
Twilio Contact Center Overview
Twilio Contact Center OverviewTwilio Contact Center Overview
Twilio Contact Center OverviewTwilio Inc
 
How To Track Calls Using Twilio?
How To Track Calls Using Twilio?How To Track Calls Using Twilio?
How To Track Calls Using Twilio?Twilio Inc
 
Twilio Web Service API for building Voice Applications
Twilio Web Service API for building Voice ApplicationsTwilio Web Service API for building Voice Applications
Twilio Web Service API for building Voice ApplicationsTwilio Inc
 
What Can You Do With Twilio
What Can You Do With TwilioWhat Can You Do With Twilio
What Can You Do With TwilioTwilio Inc
 
DevSecOps in Baby Steps
DevSecOps in Baby StepsDevSecOps in Baby Steps
DevSecOps in Baby StepsPriyanka Aash
 
Application Security at DevOps Speed - DevOpsDays Singapore 2016
Application Security at DevOps Speed - DevOpsDays Singapore 2016Application Security at DevOps Speed - DevOpsDays Singapore 2016
Application Security at DevOps Speed - DevOpsDays Singapore 2016Stefan Streichsbier
 
Integrating DevOps and Security
Integrating DevOps and SecurityIntegrating DevOps and Security
Integrating DevOps and SecurityStijn Muylle
 
DevSecCon Asia 2017 Fabian Lim: DevSecOps in the government
DevSecCon Asia 2017 Fabian Lim: DevSecOps in the governmentDevSecCon Asia 2017 Fabian Lim: DevSecOps in the government
DevSecCon Asia 2017 Fabian Lim: DevSecOps in the governmentDevSecCon
 
AWS re:Invent 2016: Embracing DevSecOps while Improving Compliance and Securi...
AWS re:Invent 2016: Embracing DevSecOps while Improving Compliance and Securi...AWS re:Invent 2016: Embracing DevSecOps while Improving Compliance and Securi...
AWS re:Invent 2016: Embracing DevSecOps while Improving Compliance and Securi...Amazon Web Services
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...Sonatype
 

En vedette (20)

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

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

Manage your Public API Like a Protocol
Manage your Public API Like a ProtocolManage your Public API Like a Protocol
Manage your Public API Like a ProtocolDelyn Simons
 
Building a REST API for Longevity
Building a REST API for LongevityBuilding a REST API for Longevity
Building a REST API for LongevityMuleSoft
 
API Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie MitraAPI Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie MitraCA API Management
 
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO ForumChris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO ForumChris Mathias
 
Combining Healthcare Standards with Other RESTful APIs
Combining Healthcare Standards with Other RESTful APIsCombining Healthcare Standards with Other RESTful APIs
Combining Healthcare Standards with Other RESTful APIsBrad Genereaux
 
TAUS Webinar - Introduction to the Gengo API Ecosystem
TAUS Webinar - Introduction to the Gengo API EcosystemTAUS Webinar - Introduction to the Gengo API Ecosystem
TAUS Webinar - Introduction to the Gengo API EcosystemGengo
 
Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеSQALab
 
Global Azure2021 Verona.pptx
Global Azure2021 Verona.pptxGlobal Azure2021 Verona.pptx
Global Azure2021 Verona.pptxLuis Beltran
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIJeff Potts
 
Building the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemBuilding the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemMitch Colleran
 
RAML - APIs By Design
RAML - APIs By DesignRAML - APIs By Design
RAML - APIs By DesignUri Sarid
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxapidays
 
INTERFACE, by apidays - The 8 Key Components of a Modern API Stack by Iddo G...
INTERFACE, by apidays  - The 8 Key Components of a Modern API Stack by Iddo G...INTERFACE, by apidays  - The 8 Key Components of a Modern API Stack by Iddo G...
INTERFACE, by apidays - The 8 Key Components of a Modern API Stack by Iddo G...apidays
 
API Product Opportunity Responsibility Nicolas Sierro 2015.pptx
API Product Opportunity Responsibility Nicolas Sierro 2015.pptxAPI Product Opportunity Responsibility Nicolas Sierro 2015.pptx
API Product Opportunity Responsibility Nicolas Sierro 2015.pptxBlockchainizator
 
Nom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsNom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsTessa Mero
 
JOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJordan Open Source Association
 
Reaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get thereReaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get there3scale
 
5 Keys to API Design - API Days Paris 2013
5 Keys to API Design - API Days Paris 20135 Keys to API Design - API Days Paris 2013
5 Keys to API Design - API Days Paris 2013Daniel Feist
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays
 
How APIs are Changing Software Development
How APIs are Changing Software DevelopmentHow APIs are Changing Software Development
How APIs are Changing Software Development3scale
 

Similaire à Building A Great API - Evan Cooke, Cloudstock, December 2010 (20)

Manage your Public API Like a Protocol
Manage your Public API Like a ProtocolManage your Public API Like a Protocol
Manage your Public API Like a Protocol
 
Building a REST API for Longevity
Building a REST API for LongevityBuilding a REST API for Longevity
Building a REST API for Longevity
 
API Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie MitraAPI Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie Mitra
 
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO ForumChris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
 
Combining Healthcare Standards with Other RESTful APIs
Combining Healthcare Standards with Other RESTful APIsCombining Healthcare Standards with Other RESTful APIs
Combining Healthcare Standards with Other RESTful APIs
 
TAUS Webinar - Introduction to the Gengo API Ecosystem
TAUS Webinar - Introduction to the Gengo API EcosystemTAUS Webinar - Introduction to the Gengo API Ecosystem
TAUS Webinar - Introduction to the Gengo API Ecosystem
 
Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружение
 
Global Azure2021 Verona.pptx
Global Azure2021 Verona.pptxGlobal Azure2021 Verona.pptx
Global Azure2021 Verona.pptx
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco API
 
Building the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemBuilding the Eventbrite API Ecosystem
Building the Eventbrite API Ecosystem
 
RAML - APIs By Design
RAML - APIs By DesignRAML - APIs By Design
RAML - APIs By Design
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptx
 
INTERFACE, by apidays - The 8 Key Components of a Modern API Stack by Iddo G...
INTERFACE, by apidays  - The 8 Key Components of a Modern API Stack by Iddo G...INTERFACE, by apidays  - The 8 Key Components of a Modern API Stack by Iddo G...
INTERFACE, by apidays - The 8 Key Components of a Modern API Stack by Iddo G...
 
API Product Opportunity Responsibility Nicolas Sierro 2015.pptx
API Product Opportunity Responsibility Nicolas Sierro 2015.pptxAPI Product Opportunity Responsibility Nicolas Sierro 2015.pptx
API Product Opportunity Responsibility Nicolas Sierro 2015.pptx
 
Nom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsNom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIs
 
JOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best Practices
 
Reaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get thereReaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get there
 
5 Keys to API Design - API Days Paris 2013
5 Keys to API Design - API Days Paris 20135 Keys to API Design - API Days Paris 2013
5 Keys to API Design - API Days Paris 2013
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
 
How APIs are Changing Software Development
How APIs are Changing Software DevelopmentHow APIs are Changing Software Development
How APIs are Changing Software Development
 

Plus de Twilio Inc

Building Blocks for Next Generation Contact Centers
Building Blocks for Next Generation Contact CentersBuilding Blocks for Next Generation Contact Centers
Building Blocks for Next Generation Contact CentersTwilio Inc
 
Create an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your CustomersCreate an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your CustomersTwilio Inc
 
Salesforce’s Andy Kung on the Power of CRM Integrations
 Salesforce’s Andy Kung on the Power of CRM Integrations Salesforce’s Andy Kung on the Power of CRM Integrations
Salesforce’s Andy Kung on the Power of CRM IntegrationsTwilio Inc
 
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call CenterAll Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call CenterTwilio Inc
 
Why Mobile Messaging Works?
Why Mobile Messaging Works?Why Mobile Messaging Works?
Why Mobile Messaging Works?Twilio Inc
 
Understand How Consumers Use Messaging
Understand How Consumers Use MessagingUnderstand How Consumers Use Messaging
Understand How Consumers Use MessagingTwilio Inc
 
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Inc
 
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Inc
 
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging Twilio Inc
 
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact CenterTwilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact CenterTwilio Inc
 
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + TwilioTwilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + TwilioTwilio Inc
 
Twilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware RevolutionTwilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware RevolutionTwilio Inc
 
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMSTwilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMSTwilio Inc
 
Twilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos PatternsTwilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos PatternsTwilio Inc
 
Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits Twilio Inc
 
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTCTwilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTCTwilio Inc
 
Twilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead GenerationTwilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead GenerationTwilio Inc
 
Twilio Signal 2016 Bots
Twilio Signal 2016 BotsTwilio Signal 2016 Bots
Twilio Signal 2016 BotsTwilio Inc
 
Twilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App GlobalTwilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App GlobalTwilio Inc
 
Twilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications OverviewTwilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications OverviewTwilio Inc
 

Plus de Twilio Inc (20)

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

Dernier

Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 

Dernier (20)

Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 

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=http%3A%2F%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