SlideShare a Scribd company logo
REST and API Management
              with


              Hiranya Jayathilaka
         Product Manager – WSO2 ESB



                      
What is REST?
    ●   REpresentational State Transfer
    ●   Lightweight, Client­Server architecture
    ●   Interactions are based on the transfer of 
        resource state representations
    ●   Systems exchange state representations and 
        perform application state transitions
    ●   Mostly implemented using HTTP but can be 
        based on other protocols
                                
Origin and Growth
    ●   First introduced by Roy Fielding in his doctoral 
        dissertation
    ●   Developed in parallel with HTTP/1.1
    ●   WWW is the largest known implementation of a 
        RESTful architecture
    ●   Widely used in modern days as an alternative to 
        technologies like CORBA and SOAP


                                
REST By Example...
    ●   Learning Management System for a school
    ●   A number of fundamental concepts
        ●   Student
        ●   Course
        ●   Teacher
    ●   In a RESTful design these concepts are likely to 
        become the 'resources' managed by the LMS


                               
The 'Student' Resource State
    ●   Name
    ●   Index number
    ●   Age
    ●   Date of birth
    ●   Contact information
    ●   GPA
    ●   ...
                               
State Representation ­ XML




                 
State Representation ­ JSON




                  
Application State
    ●   Applications have states
        ●   Number of students in the system
        ●   Number of associations between students and 
            courses
        ●   Number of teachers
    ●   Application state transitions may occur as a 
        result of a resource state transfer
    ●   Application state can also be represented using 
        some data format or hyper text references
                                   
Representational State Transfer
    ●   Clients and servers interact with each other by 
        exchanging 
        ●   Resource state representations
        ●   Application state representations
        ●   Other control information




                                    
RESTful Interactions




              
Why HTTP?
    ●   Rich vocabulary and powerful tools that are 
        ideal for representing resource states, 
        application states and control data
        ●   Application state – Status code + Links
        ●   Resource state – HTTP entity
        ●   Control data – HTTP method
    ●   CRUD operations map nicely into HTTP 
        methods

                                    
HTTP Based RESTful Interactions




                    
Advantages
    ●   Simple and lightweight
        ●   Easy to implement
        ●   Very little processing at the application level
        ●   Small amount of data to pass around
    ●   Support any content type
    ●   Leverage built­in application layer protocol 
        semantics without reinventing the wheel


                                     
Notable Deployments
    ●   Amazon AWS (Over 90% of the clients are 
        using the RESTful API)
    ●   Google Maps
    ●   Yahoo!
    ●   eBay
        ●   Sastry Malladi on service orientation ­ 
            http://www.youtube.com/watch?v=O­9osZGXDok


                                
WSO2 ESB
    ●   A lightweight, high­performance ESB
    ●   Feature rich and standards compliant
        ●   SOAP and WS­* standards
        ●   REST support
        ●   Variety of protocols and message formats
    ●   User friendly and highly extensible
    ●   100% free and open source with commercial 
        support
                                   
Under the Hood
    ●   WSO2 ESB is based on a number of well 
        known Apache projects
        ●   Synapse ­ http://synapse.apache.org
        ●   Axis2­ http://axis.apache.org/axis2/java/core
        ●   Web Services ­ http://ws.apache.org
    ●   REST support of WSO2 ESB stems from the 
        REST support offered by Axis2


                                    
REST Support in Axis2
    ●   Axis2 provides a REST binding for each 
        deployed web service
    ●   This enables clients to invoke any Axis2 service 
        via REST calls
        ●   GET /services/HelloService/sayHello
        ●   GET /services/MathService/add?a=5&b=10




                                   
REST Support in WSO2 ESB
    ●   WSO2 ESB can receive and mediate REST 
        calls just like any other request
    ●   The same mediators that work with SOAP can 
        be used to manipulate REST invocations
        ●   Log, Send, Filter, Switch, XSLT, DBLookup....
    ●   Additional handles provided by the ESB in the 
        form of properties
    ●   Easily switch between SOAP and REST
                                    
Exposing a SOAP Service via REST




                
Sample Proxy Configuration




                 
Exposing a REST/POX Service via 
                 SOAP




                    
Sample Proxy Configuration




                 
Exercising More Control Over REST
    ●   Manipulate REST calls based on
        ●   HTTP method
        ●   Status code
        ●   Content type
        ●   HTTP headers




                             
Accessing HTTP Method




               
Examples




        
Accessing HTTP Status Codes




                  
Examples




        
Manipulating HTTP Headers




                 
Examples




        
REST APIs
    ●   An API is similar to a web application hosted on 
        the ESB
    ●   Anchored at a specific URL path (context)
        ●   /test
        ●   /dictionary
        ●   /foo/bar
    ●   Can be bound to a specific host and a port
    ●   Contains one or more resources
                                
Resources
    ●   A RESTful resource exposed over HTTP
    ●   Similar to a proxy service but focuses on REST
    ●   Can be associated with
        ●   A set of HTTP methods
            –   GET only, GET and POST only, All HTTP methods
        ●   A specific content type
            –   application/xml, application/json
        ●   A particular class of clients (user agents)

                                         
Dispatching Requests to a Resource
    ●   URL patterns
        ●   Reg­Ex match (/test/*)
        ●   Extension match (*.jsp)
        ●   Exact match (/test/index.jsp)
    ●   URI templates
        ●   /dictionary/{character}/{word}
        ●   /accounts/{accountId}/{operation}


                                      
APIs and Resources




             
Resource Examples




             
API Example




          
APIs in Action




           
API Management Goals
    ●   Service provider objectives
        ●   Define APIs
        ●   Define security requirements and SLAs
        ●   Monitor API usage and SLAs
    ●   Service consumer objectives
        ●   Discover and browse APIs
        ●   Sign up and obtain API keys
        ●   Consume APIs using the obtained keys
        ●   Monitor API usage and SLAs
                                     
Solution Architecture




               
WSO2 Product Mapping




              
Summary and Recap
    ●   REST is a lightweight, client­server architecture for building 
        distributed systems
    ●   RESTful designs are concerned with resources, states and 
        transfer of representational state between systems
    ●   WSO2 ESB provides excellent support for receiving, processing 
        and intermediating REST (HTTP) calls
    ●   The new API concept is a powerful feature which allows 
        developers to define REST APIs in the ESB without writing any 
        additional code
    ●   WSO2 platform is ideally suited for developing comprehensive and 
        flexible API management solutions based on open standards

                                          
Questions?




         
Selected Customers




             
WSO2 Engagement Model
    ●   Quick Start
    ●   Development Support
    ●   Development Services
    ●   Production Support
    ●   Turnkey Solutions
        ●   WSO2 Mobile Services Solution
        ●   WSO2 FIX Gateway Solution
        ●   WSO2 SAP Gateway Solution
                                  
Thank You




         

More Related Content

PDF
WSO2 Enterprise Service Bus - Product Overview
PDF
Restful Integration with WSO2 ESB
PPT
ClearCase Basics
PDF
Microservice With Spring Boot and Spring Cloud
PPTX
Introduction to microservices
PDF
톰캣 운영 노하우
PPTX
애플리케이션 최적화를 위한 컨테이너 인프라 구축
PDF
Introduction to Apache Synapse
WSO2 Enterprise Service Bus - Product Overview
Restful Integration with WSO2 ESB
ClearCase Basics
Microservice With Spring Boot and Spring Cloud
Introduction to microservices
톰캣 운영 노하우
애플리케이션 최적화를 위한 컨테이너 인프라 구축
Introduction to Apache Synapse

What's hot (20)

PPTX
Express js
PDF
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager
PPTX
パケット キャプチャで学ぶ SMB (CIFS) の基本
PPTX
Docker introduction
PPTX
Leveraging Nexus Repository Manager at the Heart of DevOps
PDF
Introduction to WSO2 ESB
PDF
Jenkins를 활용한 Openshift CI/CD 구성
PPT
Maven Overview
PDF
WASM! WASI! WAGI! WAT?
PDF
Service mesh(istio) monitoring
PDF
Jenkins
PDF
Event-Driven Microservices With NATS Streaming
PPTX
Introduction à spring boot
PDF
REST APIs with Spring
PDF
WSO2 ESB Integration with REST
PPTX
IBM WebSphere Application Server (Clustering) Concept
PPTX
Final terraform
PPTX
Maven tutorial
PDF
Open source APM Scouter로 모니터링 잘 하기
Express js
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager
パケット キャプチャで学ぶ SMB (CIFS) の基本
Docker introduction
Leveraging Nexus Repository Manager at the Heart of DevOps
Introduction to WSO2 ESB
Jenkins를 활용한 Openshift CI/CD 구성
Maven Overview
WASM! WASI! WAGI! WAT?
Service mesh(istio) monitoring
Jenkins
Event-Driven Microservices With NATS Streaming
Introduction à spring boot
REST APIs with Spring
WSO2 ESB Integration with REST
IBM WebSphere Application Server (Clustering) Concept
Final terraform
Maven tutorial
Open source APM Scouter로 모니터링 잘 하기
Ad

Viewers also liked (8)

PDF
Improved JSON Support of WSO2 ESB 4.8
PDF
Best Practices for API Management
PPTX
Wso2 tutorial
PPT
Why API Management is Not Enough
PDF
Understanding the WSO2 Platform and Technology
PDF
Definitive Guide to API Management
PPTX
API Management in Digital Transformation
PDF
Architecting an Enterprise API Management Strategy
Improved JSON Support of WSO2 ESB 4.8
Best Practices for API Management
Wso2 tutorial
Why API Management is Not Enough
Understanding the WSO2 Platform and Technology
Definitive Guide to API Management
API Management in Digital Transformation
Architecting an Enterprise API Management Strategy
Ad

Similar to REST & API Management with the WSO2 ESB (20)

PDF
Role of Rest vs. Web Services and EI
PDF
Understanding REST-Based Services: Simple, Scalable, and Platform Independent
PPTX
RESTful Services
PDF
Apply API Governance to RESTful Service APIs using WSO2 Governance Registry a...
PDF
Restful风格ž„web服务架构
PDF
JAX-RS JavaOne Hyderabad, India 2011
PDF
Res tful web services oracle
PDF
RESTful applications: The why and how by Maikel Mardjan
PPTX
REST and ASP.NET Web API (Tunisia)
PDF
Introduction to REST and Jersey
PDF
What is REST?
PPTX
Unerstanding and Using RESTful APIs
PPTX
Rest presentation
PPTX
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
PDF
REST Basics
PDF
REST API Recommendations
PDF
On being RESTful
PPTX
Rest webservice ppt
PDF
Secc tutorials development and deployment of rest web services in java_v2.0
PDF
Ebook undisturbed rest-v1 [res_tful apis]
Role of Rest vs. Web Services and EI
Understanding REST-Based Services: Simple, Scalable, and Platform Independent
RESTful Services
Apply API Governance to RESTful Service APIs using WSO2 Governance Registry a...
Restful风格ž„web服务架构
JAX-RS JavaOne Hyderabad, India 2011
Res tful web services oracle
RESTful applications: The why and how by Maikel Mardjan
REST and ASP.NET Web API (Tunisia)
Introduction to REST and Jersey
What is REST?
Unerstanding and Using RESTful APIs
Rest presentation
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
REST Basics
REST API Recommendations
On being RESTful
Rest webservice ppt
Secc tutorials development and deployment of rest web services in java_v2.0
Ebook undisturbed rest-v1 [res_tful apis]

More from WSO2 (20)

PDF
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
PDF
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
PDF
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
PDF
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
PDF
Platformless Modernization with Choreo.pdf
PDF
Application Modernization with Choreo for the BFSI Sector
PDF
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
PDF
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
PPTX
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
PPTX
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
PPTX
WSO2Con 2025 - Building Secure Customer Experience Apps
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
PPTX
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
PPTX
WSO2Con 2025 - Architecting Cloud-Native Applications
PDF
Mastering Intelligent Digital Experiences with Platformless Modernization
PDF
Accelerate Enterprise Software Engineering with Platformless
PDF
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Platformless Modernization with Choreo.pdf
Application Modernization with Choreo for the BFSI Sector
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
WSO2Con 2025 - Building Secure Customer Experience Apps
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - Architecting Cloud-Native Applications
Mastering Intelligent Digital Experiences with Platformless Modernization
Accelerate Enterprise Software Engineering with Platformless
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation

Recently uploaded (20)

PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
KodekX | Application Modernization Development
PDF
Electronic commerce courselecture one. Pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Cloud computing and distributed systems.
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
GamePlan Trading System Review: Professional Trader's Honest Take
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
KodekX | Application Modernization Development
Electronic commerce courselecture one. Pdf
NewMind AI Weekly Chronicles - August'25 Week I
Advanced Soft Computing BINUS July 2025.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Cloud computing and distributed systems.
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Machine learning based COVID-19 study performance prediction
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Unlocking AI with Model Context Protocol (MCP)
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The AUB Centre for AI in Media Proposal.docx
“AI and Expert System Decision Support & Business Intelligence Systems”

REST & API Management with the WSO2 ESB

  • 1. REST and API Management with Hiranya Jayathilaka Product Manager – WSO2 ESB    
  • 2. What is REST? ● REpresentational State Transfer ● Lightweight, Client­Server architecture ● Interactions are based on the transfer of  resource state representations ● Systems exchange state representations and  perform application state transitions ● Mostly implemented using HTTP but can be  based on other protocols    
  • 3. Origin and Growth ● First introduced by Roy Fielding in his doctoral  dissertation ● Developed in parallel with HTTP/1.1 ● WWW is the largest known implementation of a  RESTful architecture ● Widely used in modern days as an alternative to  technologies like CORBA and SOAP    
  • 4. REST By Example... ● Learning Management System for a school ● A number of fundamental concepts ● Student ● Course ● Teacher ● In a RESTful design these concepts are likely to  become the 'resources' managed by the LMS    
  • 5. The 'Student' Resource State ● Name ● Index number ● Age ● Date of birth ● Contact information ● GPA ● ...    
  • 8. Application State ● Applications have states ● Number of students in the system ● Number of associations between students and  courses ● Number of teachers ● Application state transitions may occur as a  result of a resource state transfer ● Application state can also be represented using  some data format or hyper text references    
  • 9. Representational State Transfer ● Clients and servers interact with each other by  exchanging  ● Resource state representations ● Application state representations ● Other control information    
  • 11. Why HTTP? ● Rich vocabulary and powerful tools that are  ideal for representing resource states,  application states and control data ● Application state – Status code + Links ● Resource state – HTTP entity ● Control data – HTTP method ● CRUD operations map nicely into HTTP  methods    
  • 13. Advantages ● Simple and lightweight ● Easy to implement ● Very little processing at the application level ● Small amount of data to pass around ● Support any content type ● Leverage built­in application layer protocol  semantics without reinventing the wheel    
  • 14. Notable Deployments ● Amazon AWS (Over 90% of the clients are  using the RESTful API) ● Google Maps ● Yahoo! ● eBay ● Sastry Malladi on service orientation ­  http://www.youtube.com/watch?v=O­9osZGXDok    
  • 15. WSO2 ESB ● A lightweight, high­performance ESB ● Feature rich and standards compliant ● SOAP and WS­* standards ● REST support ● Variety of protocols and message formats ● User friendly and highly extensible ● 100% free and open source with commercial  support    
  • 16. Under the Hood ● WSO2 ESB is based on a number of well  known Apache projects ● Synapse ­ http://synapse.apache.org ● Axis2­ http://axis.apache.org/axis2/java/core ● Web Services ­ http://ws.apache.org ● REST support of WSO2 ESB stems from the  REST support offered by Axis2    
  • 17. REST Support in Axis2 ● Axis2 provides a REST binding for each  deployed web service ● This enables clients to invoke any Axis2 service  via REST calls ● GET /services/HelloService/sayHello ● GET /services/MathService/add?a=5&b=10    
  • 18. REST Support in WSO2 ESB ● WSO2 ESB can receive and mediate REST  calls just like any other request ● The same mediators that work with SOAP can  be used to manipulate REST invocations ● Log, Send, Filter, Switch, XSLT, DBLookup.... ● Additional handles provided by the ESB in the  form of properties ● Easily switch between SOAP and REST    
  • 23. Exercising More Control Over REST ● Manipulate REST calls based on ● HTTP method ● Status code ● Content type ● HTTP headers    
  • 30. REST APIs ● An API is similar to a web application hosted on  the ESB ● Anchored at a specific URL path (context) ● /test ● /dictionary ● /foo/bar ● Can be bound to a specific host and a port ● Contains one or more resources    
  • 31. Resources ● A RESTful resource exposed over HTTP ● Similar to a proxy service but focuses on REST ● Can be associated with ● A set of HTTP methods – GET only, GET and POST only, All HTTP methods ● A specific content type – application/xml, application/json ● A particular class of clients (user agents)    
  • 32. Dispatching Requests to a Resource ● URL patterns ● Reg­Ex match (/test/*) ● Extension match (*.jsp) ● Exact match (/test/index.jsp) ● URI templates ● /dictionary/{character}/{word} ● /accounts/{accountId}/{operation}    
  • 37. API Management Goals ● Service provider objectives ● Define APIs ● Define security requirements and SLAs ● Monitor API usage and SLAs ● Service consumer objectives ● Discover and browse APIs ● Sign up and obtain API keys ● Consume APIs using the obtained keys ● Monitor API usage and SLAs    
  • 40. Summary and Recap ● REST is a lightweight, client­server architecture for building  distributed systems ● RESTful designs are concerned with resources, states and  transfer of representational state between systems ● WSO2 ESB provides excellent support for receiving, processing  and intermediating REST (HTTP) calls ● The new API concept is a powerful feature which allows  developers to define REST APIs in the ESB without writing any  additional code ● WSO2 platform is ideally suited for developing comprehensive and  flexible API management solutions based on open standards    
  • 43. WSO2 Engagement Model ● Quick Start ● Development Support ● Development Services ● Production Support ● Turnkey Solutions ● WSO2 Mobile Services Solution ● WSO2 FIX Gateway Solution ● WSO2 SAP Gateway Solution