32
Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager © WSO2 2011. Not for redistribution. Commercial in Confidence. lean . enterprise . middleware Chris Haddad Technology evangelism, strategy, and roadmaps Follow me @cobiacomm on Twitter Read more about our API Story at blog.cobia.net/cobiacomm http://wso2.com/products/api-manager

Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

  • Upload
    wso2

  • View
    3.648

  • Download
    3

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Apply API Governance

to RESTful Service APIs

using WSO2 Governance Registry

and WSO2 API Manager

© WSO2 2011. Not for redistribution. Commercial in Confidence.

lean . enterprise . middleware

Chris Haddad Technology evangelism, strategy, and roadmaps

Follow me @cobiacomm on Twitter

Read more about our API Story at

blog.cobia.net/cobiacomm

http://wso2.com/products/api-manager

Page 2: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

WSO2 Carbon Enterprise Middleware Platform

*

Page 3: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Business APIs

“APIs provide a way to make resources

available for internal and external partners

to access information and services.”

Page 4: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

APIs All the Way…

Page 5: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

API Architecture

An API is a business capability delivered over the Internet to

internal or external consumers • Network accessible function

• Available using standard web protocols

• With well-defined interfaces

• Designed for access by third-parties

A Managed API is: • Actively advertised and subscribe-able

• Exhibits high Quality of Service (QoS)

• Available with Service Level Agreements (SLAs)

• Secured, authenticated, authorized and protected

• Monitored and monetized with analytics

Page 6: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Resources

• Addressable Resources: • Every “object” on your network should have a unique ID.

• An important aspect is that each “object” or resource has its

own specific URI where it can be addressed

• A Uniform, Constrained Interface. • When applying REST over HTTP, stick to the methods

provided by the protocol • GET, POST, PUT, and DELETE.

• These should be used properly • GET should have no side effects or change on state

• PUT should update the resource “in-place”

• The content-type of the resource should be useful and

meaningful

Page 7: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

REST is full of subtleties

• Method Safety • GET, HEAD, OPTIONS, TRACE will not modify

anything

• Idempotency • PUT, DELETE, GET, HEAD can be repeated and

the side-effects remain the same

• Caching • Correct use of Last-Modified and ETag headers

• Content-negotiation

Page 8: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

The benefits of a well-designed REST app

• Bookmarkability • Each URI really points to a unique entity • Every entity can be referenced

• Multiple representations are powerful • Allowing one view of a resource for users and one

for systems makes application development simpler and more logical

• Having well defined links • Does improve the semantic richness of an

application • By comparison WSDL is very flat and doesn’t show

the links between operations and services

Page 9: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Hypertext as the Engine of Application State

Resources are identified by URIs

Clients communicate with resources via requests using a

standard set of methods

Requests and responses contain resource representations

in formats identified by media types

Responses contain URIs that link to further resources

Page 10: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Heavy weight Governance

Page 11: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

The REST Way

Page 12: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

How to be successful?

Page 13: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Business Design of the APIs

• Know the consumer

• Who will use the APIs (both developers and final end-user)?

• What type of applications will use the APIs?

• What business assets will be delivered?

• Maintain Operational Control

• What Quality of Service is expected?

• Who can access the assets?

• Remember Usability and Monetization

• How will the API expose business assets?

• How will you demonstrate business value via direct revenue,

chargeback, or showback?

Page 14: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

API Challenges

Often difficult to offer your business capabilities as an API

• Potential consumers do not trust API stability, reliability,

availability, or performance

• Providers have scalability concerns and lack an ability to

manage consumption

• Security risks prevent publishing and offering open access

• Difficult to manage requirements from multiple consumers and

coordinate release schedule

• Inability to configure API per consumer

• Business return requires API metering usage rates, and billing

Page 15: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Use of Registries in RestFul Architecture

• Registry/Repository Aspects: • Structured Organization of Data

• Dependencies – Dependency Analysis

• Versioning of Assets (WADL/WSDL, Schema, Policies)

• Extensible meta-model (especially your custom configurations)

• Custom Properties/Meta-information

• Integration/Governance Aspects: • Impact, Notification, and Change Management

• Broader Lifecycle Integration

• API-access to resources

• Endpoint discovery

Page 16: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Building an Approval Model: SCXML

• State Chart XML: State Machine Notation for Control

Abstraction

• An OASIS Standard

• Embedded Apache Commons SCXML library

• GUI/Tooling • IBM Rational Software Architect

• SCXMLgui

• WSO2 Carbon Studio – Future

Page 17: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

API Governance Roadmap

• Design Time Governance

• Run-time Operational Governance

Page 18: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

API Design Time Governance Roadmap

REST Design Contract Review

• Stateless

• Resource-oriented URL Convention

• Xlinks

• Security

Page 19: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

API Design Time Governance Roadmap

Consumer / Subscriber Relationships

• API Manager • Promotes available APIs

• Tracks subscriptions

Page 20: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

API Design Time Governance Roadmap

API Versioning

• REST URL convention

• API Payload versioning

• Associating API to Service

Page 21: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

21

Operational Governance

Page 22: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

22

Operational Governance

Page 23: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

23

Operational Governance

Page 24: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

24

Operational Governance

Page 25: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

25

Operational Governance

Page 26: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

26

Operational Governance

Page 27: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

27

Operational Governance

Page 28: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

28

Operational Governance

Page 29: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

29

Operational Governance

Page 30: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

30

Operational Governance

Page 31: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

Contact us:

http://wso2.com/contact/

Follow us:

http://twitter.com/#!/wso2

Follow us:

http://twitter.com/#!/wso2

Page 32: Apply API Governance to RESTful Service APIs using WSO2 Governance Registry and WSO2 API Manager

lean . enterprise . middleware