API Strategies in the Enterprise
-
Upload
ross-mason -
Category
Technology
-
view
868 -
download
10
description
Transcript of API Strategies in the Enterprise
![Page 1: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/1.jpg)
Ross Mason @rossmason
Strategies for
APIs in the
Enterprise
![Page 2: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/2.jpg)
About me
• Created the Mule project• Founded MuleSoft• API eye for the SOAP guy• Thingologist (thingology.org)
@rossmason
![Page 3: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/3.jpg)
All contents Copyright © 2013, MuleSoft Inc.
Why would an enterprise company buy ProgrammableWeb.com?
+ = ?
@rossmason
![Page 4: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/4.jpg)
All contents Copyright © 2013, MuleSoft Inc.
Web APIs are the
Playbook for the
enterprise
@rossmason
![Page 5: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/5.jpg)
All contents Copyright © 2013, MuleSoft Inc.
…or 13,000 ideas
to steal adapt
@rossmason
![Page 6: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/6.jpg)
All contents Copyright © 2013, MuleSoft Inc.#MuleSoftWebinar
RESTful APIs
@rossmason
![Page 7: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/7.jpg)
Open APIs are the tip of the iceberg
13,000
@rossmason
![Page 8: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/8.jpg)
Open APIs are the tip of the iceberg
13,000
1,000,000sof APIsin the
enterprise
@rossmason
![Page 9: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/9.jpg)
All contents Copyright © 2013, MuleSoft Inc.
Enterprise APIs = API delivery at scale
- 3Cs: Clean, Clear, Consistent- Across teams, across orgs- Rapid creation, iteration, lifecycle
management
@rossmason
![Page 10: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/10.jpg)
SOA
API
@rossmason
![Page 11: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/11.jpg)
All contents Copyright © 2013, MuleSoft Inc.
Enterprise SOA
- 3Cs: Clean, Clear, Consistent- Across teams, across orgs- Rapid creation, iteration, lifecycle
management
@rossmason
![Page 12: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/12.jpg)
APIs in the Enterprise
Your APIs
Developer
Customers
Partners
AffiliatesMobile
Internal projects
Your Assets
@rossmason
![Page 13: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/13.jpg)
What we see in the Enterprise
Your APIs
Developer
Customers
Partners
AffiliatesMobile
Internal projects
Your Assets
@rossmason
![Page 14: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/14.jpg)
API types and business opportunities
Source: Forrester, Establish your API design, June 2013
![Page 15: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/15.jpg)
@rossmason
![Page 16: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/16.jpg)
APX: Between Form and Function
APX
Application Programming eXperience
@rossmason
![Page 17: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/17.jpg)
• Design for them• Iterate quickly• Model cleanly and consistently • Engage
Delight your API consumers
@rossmason
![Page 18: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/18.jpg)
• Orchestrating service provider…
• …or core single-purpose service?
• Back end…
• …or front end?
• Straight-through proxy…
• …or new façade?
What is your value add?consumer devs
@rossmason
![Page 19: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/19.jpg)
Think APX!
Don't expose dirty laundry
users
products
ordersinvoices
Craft it for your users: what will they love?
• This is a long-lived interface, • ladies and gentlemen
@rossmason
![Page 20: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/20.jpg)
my focus today• SOAP and WSDL over HTTP• REST: HTTP taken seriously
• e.g. GET /users a page/data representing users• Mix & match:
• Google protocol buffers over HTTP• <something> over websockets
•API facades:• the RESTmullet (REST in front, SOAP in back)• mobile REST/GPB/MQTT on top of SOA
Forms of APIs
@rossmason
![Page 21: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/21.jpg)
All contents Copyright © 2013, MuleSoft Inc.
The 3Cs in Action(Clean, Clear, Consistent)
@rossmason
![Page 22: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/22.jpg)
• Nouns: resources• Carefully consider your domain objects• Query params are refinements on resources• /users• /users?zip=94301&subscribed=true• /users/me• /users/5638• /users/5638/books• /users/5638/books/20467• /books• /books/20467
Practical REST, be Clear
@rossmason
![Page 23: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/23.jpg)
• Verbs: methods
Practical REST, be Clear and Consistent
GET retrieve (idempotent!)
POST create in container
PUT update – replace (usually)
PATCH update – partial
DELETE remove
HEAD GET w/o body (headers)
OPTIONS metadata, e.g. methods
Status codes• Standardized• Use them!
• Don't return 200unless it's really OK
• No surprises please
Headers• Standardized• Use them!
@rossmason
![Page 24: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/24.jpg)
•We like RAML: RESTful API Modeling Language
• Clean, clear, powerful• 100% natural & organic• Open, vendor-neutral• Practical• Pattern-based design
is built in
How to describe your specific API?
@rossmason
![Page 25: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/25.jpg)
Clean, align to a logical model: users & groups
@rossmason
![Page 26: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/26.jpg)
Clean, align to a logical model: eCommerce
@rossmason
![Page 27: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/27.jpg)
collections and members
Consistent patterns: resource types
"special" id's
one-off resources
read-only resources
@rossmason
![Page 28: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/28.jpg)
Consistent patterns: method traits
@rossmason
![Page 29: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/29.jpg)
Be Clear: body schemas
or just use good ol' form data:
XML schema
JSON schema
examples@rossmason
![Page 30: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/30.jpg)
Be Clear: security schemesusername/password; cleartext or use digest
end user allows app to access their data
better to put token in header, not query
the OAuth multi-step dance
@rossmason
![Page 31: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/31.jpg)
All contents Copyright © 2013, MuleSoft Inc.
Enterprise APIs
- 3Cs: Clean, Clear, Consistent (APX)- Across teams, across orgs (RAML.org)- Rapid creation, iteration, lifecycle
management (APIhub.com)
@rossmason
![Page 32: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/32.jpg)
Good APIs aren't trivial
But with the proper approach…
…they can be your home-court advantage"First one home wins?"
"Deal"
"#$*%!"
@rossmason
![Page 33: API Strategies in the Enterprise](https://reader031.fdocuments.net/reader031/viewer/2022020217/554fb14eb4c905ad218b5279/html5/thumbnails/33.jpg)
All contents Copyright © 2013, MuleSoft Inc.
Thank you
Twitter: @rossmasonCompany: http://mulesoft.com