creating successful apis in the enterprise
DESCRIPTION
What does it take to create create APIs at scale in the enterprise. This prTRANSCRIPT
Creating SuccessfulAPIs in the
EnterpriseRoss Mason
Founder, MuleSoft
@rossmason #GWOcon
About me
• Created the Mule project• Founded MuleSoft• Background in
distributed systems• I want to connect
everything
@rossmason #GWOcon
All contents Copyright © 2013, MuleSoft Inc.
Why would an enterprise middleware company buyProgrammableWeb.com?
+ = ?
@rossmason #GWOcon
All contents Copyright © 2013, MuleSoft Inc.
Web APIs are the
Playbook for the
enterprise
@rossmason #GWOcon
All contents Copyright © 2013, MuleSoft Inc.
…or 13,000 ideas
to steal adapt
@rossmason #GWOcon
All contents Copyright © 2013, MuleSoft Inc.#MuleSoftWebinar
RESTful APIs
@rossmason #GWOcon
Open APIs are the tip of the iceberg
13,000
@rossmason #GWOcon
Open APIs are the tip of the iceberg
13,000
1,000,000sof APIsin the
enterprise
@rossmason #GWOcon
What makes an Enterprise API successful?
• Secure?• Reliable?• Reusable?• Discoverable?• RESTful?
@rossmason #GWOcon
What makes an Enterprise API successful?
• Secure?• Reliable?• Reusable?• Discoverable?• RESTful?
IT NEEDS TO BE USEFUL AND USABLE FIRST
@rossmason #GWOcon
• KEY: DELIGHT YOUR USERS!
An Old Success Strategy Re-Emerges
how?
• design for them• iterate quickly• model cleanly and consistently• engage
Codify Req
’s
Design API
Valid
ate Publish
CaptureFeedback
•UI UX
•API APX
Design For Your Users, Iterate
@rossmason #GWOcon
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 #GWOcon
SOA
API
@rossmason #GWOcon
All contents Copyright © 2013, MuleSoft Inc.
Enterprise SOA
- 3Cs: Clean, Clear, Consistent- Across teams, across orgs- Rapid creation, iteration, lifecycle
management
@rossmason #GWOcon
APIs in the Enterprise
Your APIs
Developer
Customers
Partners
AffiliatesMobile
Internal projects
Your Assets
@rossmason #GWOcon
What we see in the Enterprise
Your APIs
Developer
Customers
Partners
AffiliatesMobile
Internal projects
Your Assets
@rossmason #GWOcon
• 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 #GWOcon
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 #GWOcon
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 #GWOcon
All contents Copyright © 2013, MuleSoft Inc.
The 3Cs in Action(Clean, Clear, Consistent)
@rossmason #GWOcon
• 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 #GWOcon
• 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 #GWOcon
•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 #GWOcon
RAML for Enterprise APIs
• Design, iterate and then code• Clean, clear, open description language• Supports inheritance so that resource behave the
same way• Traits for consistent behaviour
– Security, pagination, signing• Schema support• A human-readable contract between consumers
and producers
@rossmason #GWOcon
All contents Copyright © 2013, MuleSoft Inc.
DEMO
Anypoint Platform for APIs
http://api-portal.anypoint.mulesoft.com
@rossmason #GWOcon
The Goal:
beyond APIsto the Layers of Value
leverage
empowerment
crowd-sourcing
SOA
@rossmason #GWOcon
• Jawbone creates device, interface
• If it's closed: I can only consume
• If it's open: I can contribute
Example: Jawbone Up
Find new value…
Suggest new value…
Build new value…
Build platform!@rossmason #GWOcon
The Groundwork is Forming: Open Government
> 90k data sets~ 350 apps> 300 APIs
@rossmason #GWOcon
The Groundwork is Forming: Intuit
SMB:~ 87% of US companies~ 19 million employees
payroll, taxes, spending…
@rossmason #GWOcon
Groundwork is Forming: Expedia
Affiliate API generates $2bn of the 4bn company revenue
@rossmason #GWOcon
Groundwork is forming: Mesh APIs
@rossmason #GWOcon
29 device APIs8 application APIs2 service APIs
26 Social APIs
Common data as an API(Local, PoI, Location, consumer products) 22 Analytics APIs
A New Software Stack Emerges
1,000,000s
DB aaSmessa
ging aaS
cach
ing
aaS
geolocation aaS
social aaS
shipping aaS
approvals aaS
commerce aaS
finance aaS
anal
ytics
aaS
orchestrationorchestra
tion
orchestration
orch
estr
ation orchestration
orchestration
orch
estr
ation
API API
API
API
API
APIAP
I
APIAPI
orchestration
orchestration
orchestration
@rossmason #GWOcon
• Everything has multiple APIs
APIs Everywhere
APIs on top of APIs
Genetically-diverse, evolving
@rossmason #GWOcon
All contents Copyright © 2013, MuleSoft Inc.
Successful Enterprise APIs =APIs at scale
- 3Cs: Clean, Clear, Consistent (APX)- Across teams, across orgs (RAML.org)- Rapid creation, iteration, lifecycle
management (anypoint.mulesoft.com)
@rossmason #GWOcon
Good APIs aren't trivial
But with the proper approach…
…they can be your home-court advantage"First one home wins?"
"Deal"
"#$*%!"
@rossmason #GWOcon
All contents Copyright © 2013, MuleSoft Inc.
Thank you
Twitter: @rossmasonCompany: http://mulesoft.com