SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
Web API's World

    Michele Zonca
Application Programming Interface




  A set of rules and specifications
followed by software programs to
          communicate


                       Kings Of Code, Sept 19, 2011 Amsterdam
Which kind of Software?

●   Applications
●   Libraries
●   Programming Languages
●   Operating Systems



                   Every!

                            Kings Of Code, Sept 19, 2011 Amsterdam
Communication?
●   Send/receive low-level signals
●   Ask access to resources
●   Define object and classes
●   Query remote data
●   Integrate functionalities




                                     Kings Of Code, Sept 19, 2011 Amsterdam
Let's talk about Web!
●   A W3C working group to create Web Services
●   Backed by big companies
●   Early 2000
●   A complete standard
    ●   How to discover (UDDI)
    ●   How to describe (WSDL)
    ●   How to serialize data (SOAP)

                                   Kings Of Code, Sept 19, 2011 Amsterdam
Too complex!!



       Let's try something
            different..




            Kings Of Code, Sept 19, 2011 Amsterdam
Welcome to the Jungle




               Kings Of Code, Sept 19, 2011 Amsterdam
Representational State Transfer
●   Term created by Roy Fielding in his Doctoral
    Dissertation, 2000
●   Deep use of HTTP
    ●   HTTP Verbs
    ●   Status codes
    ●   URLs
●   Not a standard but a style, a set of constraints


                                    Kings Of Code, Sept 19, 2011 Amsterdam
REST Constraints
●   Client-Server (not only HTTP)
    ●   Uniform interface
●   Stateless
●   Cacheable
●   Layered System




                                    Kings Of Code, Sept 19, 2011 Amsterdam
Resource Oriented Architecture
●   Collection of resources
    /resources


●   Resource
    /resources/id




                              Kings Of Code, Sept 19, 2011 Amsterdam
Methods - Actions

POST            CREATE
GET             READ
PUT             UPDATE
DELETE          DELETE


      (Are you using PUTs?)


                       Kings Of Code, Sept 19, 2011 Amsterdam
Adoption




      image from programmableweb
            Kings Of Code, Sept 19, 2011 Amsterdam
Representational State Transfer




     Order in the Jungle?
                     Kings Of Code, Sept 19, 2011 Amsterdam
NO!
●   Bad/Partial implementations
●   Lack of constraints
●   Interpretation
●   BTW, is not so simple




                                  Kings Of Code, Sept 19, 2011 Amsterdam
Format


http://website.com/resources/id.xml
http://website.com/resources/id.json



 BAD! Isn't it the same resource?


                               Kings Of Code, Sept 19, 2011 Amsterdam
Use the 'Accept' header, Luke!


               ●   Used to specify
                   acceptable media
                   types for the response
               ●   RFC 2616, HTTP 1.1
               ●   It's hard to test in a
                   browser


                        Kings Of Code, Sept 19, 2011 Amsterdam
Format
●   Twitter: extension (.json, .xml)
●   Github: JSON
●   Facebook Graph API: JSON
●   Twilio: default XML, (extension .json, .csv, .html)
●   Foursquare: JSON
●   Stack Overflow: JSON



                                       Kings Of Code, Sept 19, 2011 Amsterdam
Searching
●   Global
    /search?q=search+parameters
●   Scoped
    /resources/search?q=search+parameters




                                  Kings Of Code, Sept 19, 2011 Amsterdam
Searching
●   Twitter
    ●   global = tweets → /search?q=
    ●   scoped for users search → /users/search?q=
●   Facebook Graph API
    ●   global → /search?q=
    ●   scoped via “type” parameter → /search?
        q=..&type=user
●   Linkedin: by fields → ?keywords=..&last-name..
                                   Kings Of Code, Sept 19, 2011 Amsterdam
Results Pagination
●   Linkedin: start + count
●   Github: page + per_page
●   Twilio: Page + PageSize
●   Twitter: page + rpp
●   Facebook: offset + limit
●   StackOverflow: page + pagesize



                                Kings Of Code, Sept 19, 2011 Amsterdam
Versioning

         URL              ACCEPT Header
/v1/resources/id        Best solution for custom
isn't the same                  formats:
resource available at
/v2/resources/id ?               Accept:
                        application/vnd.mycomp
                          any.myapp-v2+xml


                              Kings Of Code, Sept 19, 2011 Amsterdam
Errors
●   SOAP: HTTP code 200 and error message in
    envelop's body (FAULT element)
●   REST: HTTP codes + message


    Warning:
    HTTP Codes could be intercepted and handled by your client




                                          Kings Of Code, Sept 19, 2011 Amsterdam
Authentication

    Stateless: auth per call, not session-based
●   ApiKey over HTTPS
●   BasicHTTP Authentication
●   ApiKey to get token
●   OAuth (buzzword but not always the right
    solution)



                                Kings Of Code, Sept 19, 2011 Amsterdam
Authentication
●   Github: OAuth 2 / Basic HTTP / Basic HTTP with
    token
●   Twitter: OAuth 1.0a
●   Facebook Graph API: OAuth 2
●   SimpleGeo: OAuth / JSONP Tokens




                                  Kings Of Code, Sept 19, 2011 Amsterdam
So, what should I use?



SCENARIO
SCENARIO
SCENARIO



                  Kings Of Code, Sept 19, 2011 Amsterdam
So you have your API..




      Now??


                Kings Of Code, Sept 19, 2011 Amsterdam
Money
●   It's hard to monetize
    API
●   API = Product? A
    growing market!
●   API as viral strategy
●   Is there a “one size
    fits all” monetization
    paradigm?

                                Kings Of Code, Sept 19, 2011 Amsterdam
Monetization




           Kings Of Code, Sept 19, 2011 Amsterdam
Today
●   At Mashape, we believe this is today's best paradigm




                                       Kings Of Code, Sept 19, 2011 Amsterdam
Tomorrow?

We strongly believe “revenue sharing” model will be
                       huge

●   It's a win-win
●   API's distribution problem solved?
●   CEO of Indeed.com:
    “We tried charging for our API without much success.
    Then we paid developers to use it and it took off.”


                                       Kings Of Code, Sept 19, 2011 Amsterdam
Questions ?
 Thanks for coming!

 e: mike@mashape.com
 t: @shatsar

                 Kings Of Code, Sept 19, 2011 Amsterdam

Más contenido relacionado

Destacado

Georgetown MBA Presentation - Zurich UAE Analysis of Central Asia 3.5.12
Georgetown MBA Presentation - Zurich UAE Analysis of Central Asia 3.5.12Georgetown MBA Presentation - Zurich UAE Analysis of Central Asia 3.5.12
Georgetown MBA Presentation - Zurich UAE Analysis of Central Asia 3.5.12
Patrick Ottenhoff
 
Georgetown SFS - Chevron FDI Risk in Emerging Markets Strategy
Georgetown SFS - Chevron FDI Risk in Emerging Markets StrategyGeorgetown SFS - Chevron FDI Risk in Emerging Markets Strategy
Georgetown SFS - Chevron FDI Risk in Emerging Markets Strategy
Patrick Ottenhoff
 
2010 05 Sites Google
2010 05 Sites Google2010 05 Sites Google
2010 05 Sites Google
el gipi
 

Destacado (13)

What Wsi Can Do For You
What Wsi Can Do For YouWhat Wsi Can Do For You
What Wsi Can Do For You
 
U4J2RSF
U4J2RSFU4J2RSF
U4J2RSF
 
Bold - Accelon Showcase - SAP Business One Case Studies
Bold - Accelon Showcase - SAP Business One Case StudiesBold - Accelon Showcase - SAP Business One Case Studies
Bold - Accelon Showcase - SAP Business One Case Studies
 
Challenges of a global, single-instance implementation of Oracle 11i HRMS
Challenges of a global, single-instance implementation of Oracle 11i HRMSChallenges of a global, single-instance implementation of Oracle 11i HRMS
Challenges of a global, single-instance implementation of Oracle 11i HRMS
 
Georgetown MBA Presentation - Zurich UAE Analysis of Central Asia 3.5.12
Georgetown MBA Presentation - Zurich UAE Analysis of Central Asia 3.5.12Georgetown MBA Presentation - Zurich UAE Analysis of Central Asia 3.5.12
Georgetown MBA Presentation - Zurich UAE Analysis of Central Asia 3.5.12
 
bConnect - Automate Your Communications From SAP Business One
bConnect - Automate Your Communications From SAP Business OnebConnect - Automate Your Communications From SAP Business One
bConnect - Automate Your Communications From SAP Business One
 
La e-salud en Pediatría
La e-salud en PediatríaLa e-salud en Pediatría
La e-salud en Pediatría
 
Georgetown SFS - Chevron FDI Risk in Emerging Markets Strategy
Georgetown SFS - Chevron FDI Risk in Emerging Markets StrategyGeorgetown SFS - Chevron FDI Risk in Emerging Markets Strategy
Georgetown SFS - Chevron FDI Risk in Emerging Markets Strategy
 
2008: The Year in Political Geography
2008: The Year in Political Geography2008: The Year in Political Geography
2008: The Year in Political Geography
 
2010 05 Sites Google
2010 05 Sites Google2010 05 Sites Google
2010 05 Sites Google
 
Geometry Guide
Geometry GuideGeometry Guide
Geometry Guide
 
Zumba
ZumbaZumba
Zumba
 
Recursos web en Pediatría
Recursos web en PediatríaRecursos web en Pediatría
Recursos web en Pediatría
 

Similar a Web API's World

Android development
Android developmentAndroid development
Android development
Lope Emano
 

Similar a Web API's World (20)

APIs for mobile
APIs for mobileAPIs for mobile
APIs for mobile
 
GraphQL is actually rest
GraphQL is actually restGraphQL is actually rest
GraphQL is actually rest
 
Android Development...Using Web Technologies
Android Development...Using Web TechnologiesAndroid Development...Using Web Technologies
Android Development...Using Web Technologies
 
A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019
 
"React Native" by Vanessa Leo e Roberto Brogi
"React Native" by Vanessa Leo e Roberto Brogi "React Native" by Vanessa Leo e Roberto Brogi
"React Native" by Vanessa Leo e Roberto Brogi
 
Building an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackBuilding an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stack
 
Elixir + GraphQL = Absinthe 2019.04.10
Elixir + GraphQL = Absinthe 2019.04.10Elixir + GraphQL = Absinthe 2019.04.10
Elixir + GraphQL = Absinthe 2019.04.10
 
tittanium
tittaniumtittanium
tittanium
 
JS digest. July 2017
JS digest. July 2017JS digest. July 2017
JS digest. July 2017
 
Social connections14: Super charge your API’s with Reactive streams
Social connections14: Super charge your API’s with Reactive streamsSocial connections14: Super charge your API’s with Reactive streams
Social connections14: Super charge your API’s with Reactive streams
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008
 
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrfDEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
 
Design & Deploy a data-driven Web API in 2 hours
Design & Deploy a data-driven Web API in 2 hoursDesign & Deploy a data-driven Web API in 2 hours
Design & Deploy a data-driven Web API in 2 hours
 
Social Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open SourceSocial Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open Source
 
ICS INtegration with Node-RED and Open Source
ICS INtegration with Node-RED and Open SourceICS INtegration with Node-RED and Open Source
ICS INtegration with Node-RED and Open Source
 
Android development
Android developmentAndroid development
Android development
 
Merged Automation Talk - Pete Carapetyan - Feb 2016
Merged Automation Talk - Pete Carapetyan - Feb 2016 Merged Automation Talk - Pete Carapetyan - Feb 2016
Merged Automation Talk - Pete Carapetyan - Feb 2016
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
 
DrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low CodeDrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low Code
 
Past, Present, Future of APIS
Past, Present, Future of APISPast, Present, Future of APIS
Past, Present, Future of APIS
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Web API's World

  • 1. Web API's World Michele Zonca
  • 2. Application Programming Interface A set of rules and specifications followed by software programs to communicate Kings Of Code, Sept 19, 2011 Amsterdam
  • 3. Which kind of Software? ● Applications ● Libraries ● Programming Languages ● Operating Systems Every! Kings Of Code, Sept 19, 2011 Amsterdam
  • 4. Communication? ● Send/receive low-level signals ● Ask access to resources ● Define object and classes ● Query remote data ● Integrate functionalities Kings Of Code, Sept 19, 2011 Amsterdam
  • 5. Let's talk about Web! ● A W3C working group to create Web Services ● Backed by big companies ● Early 2000 ● A complete standard ● How to discover (UDDI) ● How to describe (WSDL) ● How to serialize data (SOAP) Kings Of Code, Sept 19, 2011 Amsterdam
  • 6. Too complex!! Let's try something different.. Kings Of Code, Sept 19, 2011 Amsterdam
  • 7. Welcome to the Jungle Kings Of Code, Sept 19, 2011 Amsterdam
  • 8. Representational State Transfer ● Term created by Roy Fielding in his Doctoral Dissertation, 2000 ● Deep use of HTTP ● HTTP Verbs ● Status codes ● URLs ● Not a standard but a style, a set of constraints Kings Of Code, Sept 19, 2011 Amsterdam
  • 9. REST Constraints ● Client-Server (not only HTTP) ● Uniform interface ● Stateless ● Cacheable ● Layered System Kings Of Code, Sept 19, 2011 Amsterdam
  • 10. Resource Oriented Architecture ● Collection of resources /resources ● Resource /resources/id Kings Of Code, Sept 19, 2011 Amsterdam
  • 11. Methods - Actions POST CREATE GET READ PUT UPDATE DELETE DELETE (Are you using PUTs?) Kings Of Code, Sept 19, 2011 Amsterdam
  • 12. Adoption image from programmableweb Kings Of Code, Sept 19, 2011 Amsterdam
  • 13. Representational State Transfer Order in the Jungle? Kings Of Code, Sept 19, 2011 Amsterdam
  • 14. NO! ● Bad/Partial implementations ● Lack of constraints ● Interpretation ● BTW, is not so simple Kings Of Code, Sept 19, 2011 Amsterdam
  • 15. Format http://website.com/resources/id.xml http://website.com/resources/id.json BAD! Isn't it the same resource? Kings Of Code, Sept 19, 2011 Amsterdam
  • 16. Use the 'Accept' header, Luke! ● Used to specify acceptable media types for the response ● RFC 2616, HTTP 1.1 ● It's hard to test in a browser Kings Of Code, Sept 19, 2011 Amsterdam
  • 17. Format ● Twitter: extension (.json, .xml) ● Github: JSON ● Facebook Graph API: JSON ● Twilio: default XML, (extension .json, .csv, .html) ● Foursquare: JSON ● Stack Overflow: JSON Kings Of Code, Sept 19, 2011 Amsterdam
  • 18. Searching ● Global /search?q=search+parameters ● Scoped /resources/search?q=search+parameters Kings Of Code, Sept 19, 2011 Amsterdam
  • 19. Searching ● Twitter ● global = tweets → /search?q= ● scoped for users search → /users/search?q= ● Facebook Graph API ● global → /search?q= ● scoped via “type” parameter → /search? q=..&type=user ● Linkedin: by fields → ?keywords=..&last-name.. Kings Of Code, Sept 19, 2011 Amsterdam
  • 20. Results Pagination ● Linkedin: start + count ● Github: page + per_page ● Twilio: Page + PageSize ● Twitter: page + rpp ● Facebook: offset + limit ● StackOverflow: page + pagesize Kings Of Code, Sept 19, 2011 Amsterdam
  • 21. Versioning URL ACCEPT Header /v1/resources/id Best solution for custom isn't the same formats: resource available at /v2/resources/id ? Accept: application/vnd.mycomp any.myapp-v2+xml Kings Of Code, Sept 19, 2011 Amsterdam
  • 22. Errors ● SOAP: HTTP code 200 and error message in envelop's body (FAULT element) ● REST: HTTP codes + message Warning: HTTP Codes could be intercepted and handled by your client Kings Of Code, Sept 19, 2011 Amsterdam
  • 23. Authentication Stateless: auth per call, not session-based ● ApiKey over HTTPS ● BasicHTTP Authentication ● ApiKey to get token ● OAuth (buzzword but not always the right solution) Kings Of Code, Sept 19, 2011 Amsterdam
  • 24. Authentication ● Github: OAuth 2 / Basic HTTP / Basic HTTP with token ● Twitter: OAuth 1.0a ● Facebook Graph API: OAuth 2 ● SimpleGeo: OAuth / JSONP Tokens Kings Of Code, Sept 19, 2011 Amsterdam
  • 25. So, what should I use? SCENARIO SCENARIO SCENARIO Kings Of Code, Sept 19, 2011 Amsterdam
  • 26. So you have your API.. Now?? Kings Of Code, Sept 19, 2011 Amsterdam
  • 27. Money ● It's hard to monetize API ● API = Product? A growing market! ● API as viral strategy ● Is there a “one size fits all” monetization paradigm? Kings Of Code, Sept 19, 2011 Amsterdam
  • 28. Monetization Kings Of Code, Sept 19, 2011 Amsterdam
  • 29. Today ● At Mashape, we believe this is today's best paradigm Kings Of Code, Sept 19, 2011 Amsterdam
  • 30. Tomorrow? We strongly believe “revenue sharing” model will be huge ● It's a win-win ● API's distribution problem solved? ● CEO of Indeed.com: “We tried charging for our API without much success. Then we paid developers to use it and it took off.” Kings Of Code, Sept 19, 2011 Amsterdam
  • 31. Questions ? Thanks for coming! e: mike@mashape.com t: @shatsar Kings Of Code, Sept 19, 2011 Amsterdam