Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

API Design Methodology - Mike Amundsen, Director of API Architecture, API Academy @ APIdays Sydney

4,281 views

Published on

At some point, we all need to design and implement APIs for the Web. What makes Web APIs different than typical component APIs? How can you leverage the power of the Internet when creating your Web API? What characteristics to many "great" Web APIs share? Is there a consistent process you can use to make sure you design a Web API that best fits your needs both now and in the future?

In this session Mike Amundsen describes a clear methodology for designing Web APIs (based on the book "RESTful Web APIs" by Richardson and Amundsen) that allows you to map key aspects of your business into a usable, scalable, and flexible interface that will reach your goals while creating a compelling API for both server and client developers. Whether you are looking to implement a private, partner, or public API, these principles will help you focus on the right metrics and design goals to create a successful API.

Published in: Technology
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ...................................ALL FOR EBOOKS................................................. Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ...................................ALL FOR EBOOKS................................................. Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS/FILE INTO AVAILABLE FORMAT - (Unlimited) ......................................................................................................................... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes Christian, Classics, Comics, Contemporary, Cookbooks, Art, Biography, Business, Chick Lit, Children's, Manga, Memoir, Music, Science, Science Fiction, Self Help, History, Horror, Humor And Comedy, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

API Design Methodology - Mike Amundsen, Director of API Architecture, API Academy @ APIdays Sydney

  1. 1. API Design Methodology Mike Amundsen, CA / Layer7 @mamund
  2. 2. Introduction
  3. 3. Actually, we have a methodology already...
  4. 4. Design Guidelines ● Craft [good/pretty/usable/stable] URIs
  5. 5. Design Guidelines ● Craft [good/pretty/usable/stable] URIs ● Map domain actions to HTTP methods (CRUD)
  6. 6. Design Guidelines ● Craft [good/pretty/usable/stable] URIs ● Map domain actions to HTTP methods (CRUD) ● Use the proper HTTP Status Codes
  7. 7. Design Guidelines ● Craft [good/pretty/usable/stable] URIs ● Map domain actions to HTTP methods (CRUD) ● Use the proper HTTP Status Codes ● Document serialized objects as HTTP bodies
  8. 8. Design Guidelines ● Craft [good/pretty/usable/stable] URIs ● Map domain actions to HTTP methods (CRUD) ● Use the proper HTTP Status Codes ● Document serialized objects as HTTP bodies ● Use HTTP headers responsibly
  9. 9. Design Guidelines ● Craft [good/pretty/usable/stable] URIs ● Map domain actions to HTTP methods (CRUD) ● Use the proper HTTP Status Codes ● Document serialized objects as HTTP bodies ● Use HTTP headers responsibly ● Describe edge cases (async, errors, authN/Z)
  10. 10. But there's a problem here...
  11. 11. Those are not design guidelines..
  12. 12. They are implementation guidelines!
  13. 13. Ok, so what is a design methodology, then?
  14. 14. Here's a simple seven-step procedure...
  15. 15. Here's a simple seven-step procedure...
  16. 16. Let's design a Maze game API
  17. 17. 1. List the Semantic Descriptors
  18. 18. 1. List the Semantic Descriptors (the what?)
  19. 19. 1. List the Semantic Descriptors (the what?) You know, the stuff!
  20. 20. 1. List the Semantic Descriptors ● A maze ● A maze cell ● A switch ● Switch position ("up" or "down") ● The title of a maze cell ● A doorway connecting to cells ● An exit from the maze ● A list of mazes
  21. 21. 2. Draw a State Diagram
  22. 22. 3. Reconcile Names
  23. 23. 3. Reconcile Names ● IANA Link Relation Values ● schema.org ● microformats ● Dublin Core ● Activity Streams
  24. 24. 3. Reconcile Names ● maze ● start ● current ● exit ● north, south, east, west ● switch ● flip
  25. 25. 3. Reconcile Names ● maze ● start (IANA) ● current (IANA) ● exit ● north, south, east, west ● switch ● flip
  26. 26. 3. Reconcile Names ● maze ● start (IANA) ● current (IANA) ● exit (microformats) ● north, south, east, west (microformats) ● switch ● flip
  27. 27. 3. Reconcile Names ● maze ● start (IANA) ● current (IANA) ● exit (microformats) ● north, south, east, west (microformats) ● switch ● flip edit (IANA)
  28. 28. 3. Reconcile Names ● http://mamund.com/rels/maze (RFC5988) ● start (IANA) ● current (IANA) ● exit (microformats) ● north, south, east, west (microformats) ● http://mamund.com.rels/switch (RFC5988) ● flip edit (IANA)
  29. 29. 3. Reconcile Names ● IANA o edit o start o current ● microformats o exit o north, south, east, west ● RFC5988 o http://mamund.com/rels/switch o http://mamund.com/rels/maze
  30. 30. OK, that was the design part...
  31. 31. But I still need to implement it, right?
  32. 32. 4. Choose a Media Type
  33. 33. 4. Choose a Media Type ● Use application/json, application/xml ● Collection type: Atom, OData, Collection+JSON ● Free-form: HTML, Siren, HAL, JSON-LD ● Invent your own semantic type
  34. 34. 4. Choose a Media Type ● Use application/json, application/xml ● Collection type: Atom, OData, Collection+JSON ● Free-form: HTML, Siren, HAL, JSON-LD ● Invent your own semantic type
  35. 35. 4. Choose a Media Type ● Use application/json, application/xml ● Collection type: Atom, OData, Collection+JSON ● Free-form: HTML, Siren, HAL, JSON-LD ● Invent your own semantic type
  36. 36. 4. Choose a Media Type ● Use application/json, application/xml ● Collection type: Atom, OData, Collection+JSON ● Free-form: HTML, Siren, HAL, JSON-LD ● Invent your own semantic type
  37. 37. 4. Choose a Media Type ● Use application/json, application/xml ● Collection type: Atom, OData, Collection+JSON ● Free-form: HTML, Siren, HAL, JSON-LD ● Invent your own semantic type
  38. 38. Collection+JSON
  39. 39. UBER+xml
  40. 40. MAZE+xml
  41. 41. 5. Write a Profile
  42. 42. 6. Implementation
  43. 43. 6. Implementation ta-da!
  44. 44. And now we have running code!
  45. 45. Wait, what's step seven?
  46. 46. 7. Publication
  47. 47. 7. Publication ● Publish your "billboard" URL ● Publish your profile ● Register new rel values and/or media types ● Publish the documentation ● Consider "well-known" URIs
  48. 48. Now, you're done!
  49. 49. Seven Simple Steps 1. List the Semantic Descriptors 2. Draw a State Diagram 3. Reconcile Names 4. Write a Profile 5. Select a Media Type 6. Implementation 7. Publication
  50. 50. Some Final Advice
  51. 51. Resources are an implementation detail
  52. 52. Don't fall into the collection trap
  53. 53. Don't start with the representation format
  54. 54. URL design doesn't matter
  55. 55. Standard names are probably better than yours.
  56. 56. Don't keep all the hypermedia in one place
  57. 57. Some Final Advice ● Resources are implementation details ● Don't fall into the collection trap ● Don't start w/ the representation format ● URL design doesn't matter ● Standard names are probably better than yours ● Don't keep all the hypermedia in one place
  58. 58. In Conclusion...
  59. 59. In Conclusion... ● Don't confuse implementation w/ design ● Design is the hard part (high value) ● Implementation is the easy part (high speed) ● Avoid common design mistakes ● Go out and make lots of APIs!
  60. 60. API Design Methodology Mike Amundsen, CA / Layer7 @mamund

×