37
Creating Successful APIs in the Enterprise Ross Mason Founder, MuleSoft @rossmason #GWOcon

Creating Successful APIs in the Enterprise

Embed Size (px)

DESCRIPTION

What does it take to create create APIs at scale in the enterprise. This pr

Citation preview

Page 1: Creating Successful APIs in the Enterprise

Creating SuccessfulAPIs in the

EnterpriseRoss Mason

Founder, MuleSoft

@rossmason #GWOcon

Page 2: Creating Successful APIs in the Enterprise

About me

• Created the Mule project• Founded MuleSoft• Background in

distributed systems• I want to connect

everything

@rossmason #GWOcon

Page 3: Creating Successful APIs in the Enterprise

All contents Copyright © 2013, MuleSoft Inc.

Why would an enterprise middleware company buyProgrammableWeb.com?

+ = ?

@rossmason #GWOcon

Page 4: Creating Successful APIs in the Enterprise

All contents Copyright © 2013, MuleSoft Inc.

Web APIs are the

Playbook for the

enterprise

@rossmason #GWOcon

Page 5: Creating Successful APIs in the Enterprise

All contents Copyright © 2013, MuleSoft Inc.

…or 13,000 ideas

to steal adapt

@rossmason #GWOcon

Page 6: Creating Successful APIs in the Enterprise

All contents Copyright © 2013, MuleSoft Inc.#MuleSoftWebinar

RESTful APIs

@rossmason #GWOcon

Page 7: Creating Successful APIs in the Enterprise

Open APIs are the tip of the iceberg

13,000

@rossmason #GWOcon

Page 8: Creating Successful APIs in the Enterprise

Open APIs are the tip of the iceberg

13,000

1,000,000sof APIsin the

enterprise

@rossmason #GWOcon

Page 9: Creating Successful APIs in the Enterprise

What makes an Enterprise API successful?

• Secure?• Reliable?• Reusable?• Discoverable?• RESTful?

@rossmason #GWOcon

Page 10: Creating Successful APIs in the Enterprise

What makes an Enterprise API successful?

• Secure?• Reliable?• Reusable?• Discoverable?• RESTful?

IT NEEDS TO BE USEFUL AND USABLE FIRST

@rossmason #GWOcon

Page 11: Creating Successful APIs in the Enterprise

• KEY: DELIGHT YOUR USERS!

An Old Success Strategy Re-Emerges

how?

• design for them• iterate quickly• model cleanly and consistently• engage

Page 12: Creating Successful APIs in the Enterprise

Codify Req

’s

Design API

Valid

ate Publish

CaptureFeedback

•UI UX

•API APX

Design For Your Users, Iterate

@rossmason #GWOcon

Page 13: Creating Successful APIs in the Enterprise

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

Page 14: Creating Successful APIs in the Enterprise

SOA

API

@rossmason #GWOcon

Page 15: Creating Successful APIs in the Enterprise

All contents Copyright © 2013, MuleSoft Inc.

Enterprise SOA

- 3Cs: Clean, Clear, Consistent- Across teams, across orgs- Rapid creation, iteration, lifecycle

management

@rossmason #GWOcon

Page 16: Creating Successful APIs in the Enterprise

APIs in the Enterprise

Your APIs

Developer

Customers

Partners

AffiliatesMobile

Internal projects

Your Assets

@rossmason #GWOcon

Page 17: Creating Successful APIs in the Enterprise

What we see in the Enterprise

Your APIs

Developer

Customers

Partners

AffiliatesMobile

Internal projects

Your Assets

@rossmason #GWOcon

Page 18: Creating Successful APIs in the Enterprise

• 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

Page 19: Creating Successful APIs in the Enterprise

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

Page 20: Creating Successful APIs in the Enterprise

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

Page 21: Creating Successful APIs in the Enterprise

All contents Copyright © 2013, MuleSoft Inc.

The 3Cs in Action(Clean, Clear, Consistent)

@rossmason #GWOcon

Page 22: Creating Successful APIs in the Enterprise

• 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

Page 23: Creating Successful APIs in the Enterprise

• 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

Page 24: Creating Successful APIs in the Enterprise

•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

Page 25: Creating Successful APIs in the Enterprise

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

Page 26: Creating Successful APIs in the Enterprise

All contents Copyright © 2013, MuleSoft Inc.

DEMO

Anypoint Platform for APIs

http://api-portal.anypoint.mulesoft.com

@rossmason #GWOcon

Page 27: Creating Successful APIs in the Enterprise

The Goal:

beyond APIsto the Layers of Value

leverage

empowerment

crowd-sourcing

SOA

@rossmason #GWOcon

Page 28: Creating Successful APIs in the Enterprise

• 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

Page 29: Creating Successful APIs in the Enterprise

The Groundwork is Forming: Open Government

> 90k data sets~ 350 apps> 300 APIs

@rossmason #GWOcon

Page 30: Creating Successful APIs in the Enterprise

The Groundwork is Forming: Intuit

SMB:~ 87% of US companies~ 19 million employees

payroll, taxes, spending…

@rossmason #GWOcon

Page 31: Creating Successful APIs in the Enterprise

Groundwork is Forming: Expedia

Affiliate API generates $2bn of the 4bn company revenue

@rossmason #GWOcon

Page 32: Creating Successful APIs in the Enterprise

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

Page 33: Creating Successful APIs in the Enterprise

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

Page 34: Creating Successful APIs in the Enterprise

• Everything has multiple APIs

APIs Everywhere

APIs on top of APIs

Genetically-diverse, evolving

@rossmason #GWOcon

Page 35: Creating Successful APIs in the Enterprise

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

Page 36: Creating Successful APIs in the Enterprise

Good APIs aren't trivial

But with the proper approach…

…they can be your home-court advantage"First one home wins?"

"Deal"

"#$*%!"

@rossmason #GWOcon

Page 37: Creating Successful APIs in the Enterprise

All contents Copyright © 2013, MuleSoft Inc.

Thank you

Twitter: @rossmasonCompany: http://mulesoft.com