API 101 - Understanding APIs

6,226 views

Published on

API 101 workshop created by Kirsten Jones (API Ninja at 3scale) for the APIStrat conference in San Francisco (October 2013).

Published in: Technology
0 Comments
22 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,226
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
265
Comments
0
Likes
22
Embeds 0
No embeds

No notes for slide
  • There are three things you should probably know about me.. first, I work for a company called Twilio where our mission is to change the way businesses communicate. [twilio spiel] Grab me after if you’d like to learn more.
  • perceived value
  • There are three things you should probably know about me.. first, I work for a company called Twilio where our mission is to change the way businesses communicate. [twilio spiel] Grab me after if you’d like to learn more.
  • API 101 - Understanding APIs

    1. 1. API 101 What are apis, and how can I use them to take over the world?
    2. 2. talk overview • Intros and Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    3. 3. Intros and getting started • Who are we? • Who are you? • Quick API definition • API Example • Workshop Participation http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    4. 4. tros and Getting Started -> Who is kirsten? API Ninja (developer evangelist) Princess Polymath
    5. 5. tros and Getting Started -> Who is Keith? DEVELOPER EVANGELIST TROUBLEMAKER
    6. 6. tros and Getting Started -> who are you? Developers Designers Marketing Management http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    7. 7. tros and Getting Started -> elevator pitch What is an API? A predictable way to communicate with a computer system http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    8. 8. tros and Getting Started -> it’s a workshop! We’re here to learn This is a safe space There are no stupid questions Someone else wants to ask too I’ll give you a treat! http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    9. 9. tros and Getting Started -> asking questions Wave your hands around! Tweet with #api101 and #apistrat ... or @synedra and @caseysoftware Comment on the API 101 Cheatsheet on http://www.princesspolymath.com http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    10. 10. tros and Getting Started -> quick api example http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    11. 11. tros and Getting Started -> twitter -> wordpress
    12. 12. tros and Getting Started -> how does that work? Wordpress Plugin Twitter API Uses Authentication Wordpress Searches API for #api101 Formats response Fills in sidebar http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    13. 13. dive into apis • Quick history of APIs • What do current APIs make possible? http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    14. 14. Dive into APIs -> Very Brief History • Computer -> Computer • Databases • Backups • Client -> Server • Email • Content Management Systems • Web Client -> API Server http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    15. 15. Dive into APIs -> what can apis do? http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    16. 16. quick break! • Don’t forget to tweet or comment your questions or comments! • Let’s check what’s there now... network willing • Audience questions? • Aaaaannnnndddd.... over to Keith! http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    17. 17. So you want to build an API? D Keith Casey Jr Developer Evangelist, Austin
    18. 18. TALK OVERVIEW • Intros and Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success @CaseySoftware Tweet thoughts to:#apistrat #api101
    19. 19. Business Cases @CaseySoftware Tweet thoughts to:#apistrat #api101
    20. 20. API FIRST! @CaseySoftware Tweet thoughts to:#apistrat #api101
    21. 21. @CaseySoftware Tweet thoughts to:#apistrat #api101
    22. 22. Platform as a strategy @CaseySoftware Tweet thoughts to:#apistrat #api101
    23. 23. Something to stand on Instead of building everything yourself.. Blackberry/RIM Build a platform that others can build on to create value.. Apple @CaseySoftware Tweet thoughts to:#apistrat #api101
    24. 24. stuff vs optimization Stuff: How can we build more stuff? Examples: manufacturing, NYT/blogging networks Optimization: How can we better distribute the stuff? Examples: Walmart, search engines/RSS readers Platform: How can we redefine ‘stuff’ & find new ways to solve the problem? Examples: Ebay/Amazon Prime, Twitter Source: http://platformed.info/platform-thinking/ @CaseySoftware Tweet thoughts to:#apistrat #api101
    25. 25. hope as marketing @CaseySoftware Tweet thoughts to:#apistrat #api101
    26. 26. marketing as marketing Toolbox Easy to use & plug into the system Magnet Pulls customers (both producers & consumers) into the system Matchmaker Accelerate & facilitate connections between producers & consumers Source: http://blogs.hbr.org/2013/01/three-elements-of-a-successful-platform/ @CaseySoftware Tweet thoughts to:#apistrat #api101
    27. 27. business reasons reasons @CaseySoftware Tweet thoughts to:#apistrat #api101
    28. 28. MARKET PENETRATION: NETFLIX @CaseySoftware Tweet thoughts to:#apistrat #api101
    29. 29. DEFENSIVE STRATEGY: PAYPAL @CaseySoftware Tweet thoughts to:#apistrat #api101
    30. 30. DRIVE USAGE: TWITTER/FACEBO OK @CaseySoftware Tweet thoughts to:#apistrat #api101
    31. 31. technical Reasons Reasons @CaseySoftware Tweet thoughts to:#apistrat #api101
    32. 32. email: Sendgrid Abstraction Abstraction @CaseySoftware Tweet thoughts to:#apistrat #api101
    33. 33. storage: Dropbox metered usage metered usage @CaseySoftware Tweet thoughts to:#apistrat #api101
    34. 34. inboxes: Context.io simplification simplification @CaseySoftware Tweet thoughts to:#apistrat #api101
    35. 35. telephony: Twilio All of the above (abstraction, metered usage, simplification) (abstraction, metered usage, simplification) (abstraction, metered usage, simplification) @CaseySoftware Tweet thoughts to:#apistrat #api101
    36. 36. Architectural considerations @CaseySoftware Tweet thoughts to:#apistrat #api101
    37. 37. Schema “An outline or model; organized pattern of thought or behavior” Source: http://en.wikipedia.org/wiki/Schema_(psychology) WRT Hypermedia: http://json-schema.org @CaseySoftware Tweet thoughts to:#apistrat #api101
    38. 38. Affordances “An affordance is a quality of an object, or an environment, which allows a user to perform an action.” Source: http://en.wikipedia.org/wiki/Affordance WRT Hypermedia: http://amundsen.com/blog/archives/1109 @CaseySoftware Tweet thoughts to:#apistrat #api101
    39. 39. Choose your own Adventure @CaseySoftware Tweet thoughts to:#apistrat #api101
    40. 40. Versioning • Two schools of thought: • Part of the name • Keith vs Keith Jr • /v1/name-of-item vs /v2/name-of-item • Part of the conversation (content negotiation) • Lunch @CaseySoftware vs dinner menu Tweet thoughts to:#apistrat #api101
    41. 41. Authentication & Access Control Access Control @CaseySoftware Tweet thoughts to:#apistrat #api101
    42. 42. TALK OVERVIEW • Intros and Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success @CaseySoftware Tweet thoughts to:#apistrat #api101
    43. 43. talk overview • Intros and Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    44. 44. REst deconstructed • HTTP • Structure • Verbs • REST • Structure • Verbs • Response Formats • JSON • XML http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    45. 45. EST Deconstructed -> conversations • Unique names for things Iced Tea • Create, Read, Update and Delete (CRUD) Order, Get order back, Change order, Cancel order • Substitutions and changes Unsweetened, Extra Ice • Context For here or to go? http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    46. 46. EST Deconstructed -> HTTP • HyperText Transfer Protocol • Main internet protocol • Browser->web server • Technically - chatty, inefficient... simple http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    47. 47. EST Deconstructed -> HTTP http messages • Simple resource address - URL (name) • Request -> Response • Context in headers • Substitutions: added to name http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    48. 48. EST Deconstructed -> HTTP HTTP verbs • GET • POST • PUT • DELETE • ... and a few others http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    49. 49. EST Deconstructed -> HTTP REST Structure • URL -> Name • Context in headers • Substitutions and changes http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    50. 50. EST Deconstructed -> HTTP REST actions • GET - Read back order • POST - Place order • PUT - Change order • DELETE - Cancel order • ... and a few others http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    51. 51. EST Deconstructed -> Formats response formats JSON { “My thing” : “Awesome sauce” } • Smaller / More efficient • More human readable • Simpler to use in many programming languages • More natural for web developers http://www.princesspolymath.com XML <stuff> <my_thing>Awesome sauce</my_thing> </stuff> • More verbose • Less human readable • Good integration with .NET • Supports better metainformation with attributes Tweet thoughts to:#apistrat #api101
    52. 52. TALK OVERVIEW • Intros and Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    53. 53. API AND DEVELOPER SUCCESS • API Design • Marketing your API • Supporting your Developers http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    54. 54. PI and Developer Success -> API DESIGN • User Experience - What do you want people to do with your API? • System constraints - How do you want them to do it? • Creation, Design and Documentation of APIs Thursday, 11:20 (Apiary.io, Swagger, APISpark, Reverb!) • Hypermedia APIs Thursday, 1:50 (Elastic Path, NPR, Comcast, Layer7) http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    55. 55. PI and Developer Success -> MARKETING YOUR API • Clearly communicate API goals and usage • Lower barrier to entry for developers • API Marketing and Evangelism Friday, 11:45 (SendGrid, Challengepost, WSO2, Hackerleague) • API Discovery Thursday, 11:20 (Mashape, Mulesoft, Klout, Parasoft) http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    56. 56. PI and Developer Success -> DEVELOPER SUPPORT • Clear, consistent communication • Fantastic documentation, tutorials, libraries • Forums, participation • Provide excellent exploration and development tools • In short, respect your developers’ time and reduce confusion http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    57. 57. Questions? • Final check for questions on twitter/comments • Audience questions? http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
    58. 58. WIFI? • PARC55-MEETING • Password is on ApistratSF2013 http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101

    ×