This workshop was designed to help people understand what APIs are in the current world, how to plan and build them, and how to avoid common pitfalls.
For more information on this topic see http://apicodex.3scale.net/content/API101
DevEX - reference for building teams, processes, and platforms
API101 Workshop - APIStrat Amsterdam 2014
1. API 101
WHAT ARE APIS,
AND HOW CAN I USE THEM TO TAKE OVER THE WORLD?
2. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business and Technical Cases
• REST Deconstructed
• API and Developer Success
3. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
INTROS AND GETTING STARTED
• Who are we?
• Who are you?
• Quick API definition
• API Example
• Workshop Participation
4. WHO IS KIRSTEN?
API NINJA (DEVELOPER EVANGELIST)
PRINCESS POLYMATH
Intros and Getting Started ->
8. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
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
Intros and Getting Started ->
9. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
ASKING QUESTIONS
Wave your hands around!
Tweet with #api101 and #apistrat
... or @synedra and @caseysoftware
Intros and Getting Started ->
13. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
HOW DOES THAT WORK?
Wordpress Plugin
Twitter API Wordpress
Uses Authentication
Searches API for #api101
Formats response
Fills in sidebar
Intros and Getting Started ->
15. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
VERY BRIEF HISTORY
• Computer -> Computer
• Databases
• Backups
• Client -> Server
• Email
• Content Management Systems
• Web Client -> API Server
Dive into APIs ->
17. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
QUICK BREAK!
• Don’t forget to tweet or comment your questions or comments!
• Audience questions?
• Aaaaannnnndddd.... over to Keith!
30. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
Platform as a Strategy
Making Stuff: How can we build more stuff?
Examples: manufacturing, NYT/blogging networks
Optimizing Stuff: How can we better distribute the stuff?
Examples: Walmart, search engines/RSS readers
Redefine Stuff: How can we redefine ‘stuff’ & find new ways to
solve the problem?
Examples: Ebay/Amazon Prime, Twitter
Source: http://platformed.info/platform-thinking/
32. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
What you can do: 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
34. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
What it looks like: 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
35. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
Who can do it: Authentication & Authorization
Authentication - Confirming who are you
Authorization - Granting access to perform certain actions
http://en.wikipedia.org/wiki/Authentication
http://en.wikipedia.org/wiki/Authorization
36. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
Talk Overview
• Intros & Getting Started
• Dive into APIs
• Business/Technical Cases
• REST Deconstructed
• API & Developer Success
38. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success
40. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
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?
REST Deconstructed ->
41. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
HTTP
• HyperText Transfer Protocol
• Main internet protocol
• Browser->web server
• Technically - chatty, inefficient... simple
REST Deconstructed ->
45. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
REST ACTIONS
• GET - Read back order
• POST - Place order
• PUT - Change order
• DELETE - Cancel order
• ... and a few others
REST Deconstructed -> HTTP
46. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
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
XML
<stuff>
<my_thing>Awesome sauce</my_thing>
</stuff>
• More verbose
• Less human readable
• Good integration with .NET
• Supports better meta-
information with attributes
REST Deconstructed -> Formats
47. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success
49. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
API 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?
• API Design and Development
Thursday, 11:20
• Hypermedia APIs
Thursday, 1:50
50. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
MARKETING YOUR API
• Clearly communicate API goals and usage
• Lower barrier to entry for developers
• API Marketing & Developer Communities
Friday, 11:45
API and Developer Success ->
51. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
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
API and Developer Success ->
52. http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
QUESTIONS?
• Final check for questions on twitter/comments
• Audience questions?
• http://apicodex.3scale.net/content/API101