SlideShare a Scribd company logo
1 of 34
Last Updated: Jan. 2014
Roshan Wijesena & Lalaji Sureshika
API Designing with
WSO2 API Manager
WSO2 API Manager Team
**
About the Presenters
๏ Roshan joined WSO2 in march 2014.He is a senior
software engineer in the WSO2 API manager
team.Prior to joining WSO2, Roshan worked at
webgurus as a Senior PHP developer where he was
responsible for designing, developing and maintaining
complex human resource management applications.
๏ Lalaji joined WSO2 in September 2010. She is a senior
software engineer in the WSO2 API Manager team
where her main focus is on the development of the
product. In addition to her product development
efforts she has provided development support and
technology consulting on customer engagements,
including customer QuickStart programs.
*
About WSO2
*
๏ Global enterprise, founded in
2005 by acknowledged leaders in
XML, web services technologies,
standards and open source
๏ Provides only open source
platform-as-a-service for private,
public and hybrid cloud
deployments
๏ All WSO2 products are 100% open
source and released under the
Apache License Version 2.0.
๏ Is an Active Member of OASIS,
Cloud Security Alliance, OSGi
Alliance, AMQP Working Group,
OpenID Foundation and W3C.
๏ Driven by Innovation
๏ Launched first open source API
Management solution in 2012
๏ Launched App Factory in 2Q 2013
๏ Launched Enterprise Store and
first open source Mobile solution
in 4Q 2013
**
What WSO2 delivers
*
What is an API
๏ A = Application P = Programming I = Interface
๏ An interface used by software components to communicate with
each other - Wikipedia
๏ Example.
My app
API calls
Facebook infrastructure
Interfaces
*
Why is a good API important?
● API providers
○ Brand building as a marketing tool.
○ Increase interest in the company products and
services.
○ Increase website traffic.
● API consumers
○ Integration with other great services/infrastructures
○ Customizable data.
*
REST API
๏ Representational State Transfer is an architectural
style that abstracts the architectural elements within
a distributed hypermedia system- wikipedia
๏ Is it easy to develop a great REST api? answer is
NO.
๏ It should be extremely easy to use for the
consumer.
*
Key Elements of a REST API
๏ Verbs
๏ Endpoints
๏ Status code
๏ Filtering
๏ Versioning
*
Good design
Resource Sample GET POST PUT DELETE
api/v1/orders Get the list of
orders
Creates a new
order
Batch update of
orders
return error
Status code 200 OK 201 CREATED 201 CREATED 400 BAD-REQUEST
api/v1/orders/100 Gets a single
order
Return an
error
Update a single
order
Delete an order
Status code 200 OK 400 BAD-
REQUEST
201 CREATED 204 NO CONTENT
*
Characteristics of good REST API
design
๏ Intuitive
๏ Documentation
๏ Analytics
๏ Stability and Consistency
๏ Security
*
Intuitive
๏ Predictable meaningful URLs
๏ Ex-/customers/100/orders/114
๏ Nouns not verbs
๏ Base URL is important.
๏ Ex : http://api.pizza.com
๏ Bad practice old RPC style
๏ /getOrders
๏ /getUsers
๏ Best practice
๏ /Orders
๏ /Orders/1
*
Documentation
๏ Should be easy to find and publicly accessible
๏ Show examples of complete request/responses/HTTP
status codes.
๏ Give some cURL examples that can directly paste in to
terminal and allow to see results.
๏ Clearly define depreciations/updates
๏ Documentation tools. ex Swagger.
*
Stability and Consistency
๏ Less volatile API.
๏ support older version of apis quite longer time
๏ maintain versioning properly.
๏ Internal consistency.
๏ Should not change parameter names and methods
๏ same naming conventions throughout entire API
๏ Record and publish changelog.
๏ publish any updates globally that everybody can
access.
*
Analytics
๏ Keep track of the version/endpoints of your API being used by
Consumers
๏ The most commonly used API calls should be made efficient.
๏ You can contact third party developer and let them know
updates
๏ Analytics tools.
*
Security
๏ Should be simple must not be difficult to get
authenticated
๏ no need to reinvent the wheel. Use existing protocols.
๏ Avoid sessions when possible
๏ Authorized based on resource content not based on
URL.
๏ Use api keys instead of username/password.
๏ Basic Auth.
๏ oAuth 2.0 + SSL.
๏ Openid connect 1.0.
*
Sample of uncompleted JAX-RS
REST API๏ GET
๏ /Customers
๏ POST
๏ /Customers
๏ {"Customer":{"name":"lalaji","address":"hello","age":2}}
๏ PUT
๏ /Customers/{id}
๏ DELETE
๏ /Customers/{id}
๏ No Baseurl
๏ No versioning
๏ No security
๏ No multiple response type
*
WSO2 API Manager
๏ WSO2 API Manager is a complete solution for designing,
implementing and managing APIs.
๏ It comes with an out of the box API Publisher which allows you
to design your API and convert it to a managed API.
๏ API Publisher provides a rich set of capabilities to
-- Design -> Plan and design a good RESTful API
-- Implement -> Deploy and test as a prototyped API
-- Manage -> Publish and expose as a managed RESTful API
*
Key Components
*
Designing APIs with WSO2 API Manager
https://ip:port/publisher/
*
Designing APIs with WSO2 API Manager
๏ Document API in Style -Swagger 2.0
A powerful representation of a RESTful API.
An open source framework implementation to describe,visualize
and consume a RESTful API.
It provides interactive documentation support.
It’s a declarative resource specification,which consumers could
understand and consume services without knowledge of server
implementation.
*
Designing APIs with WSO2 API Manager
*
Demo : Designing APIs with WSO2 API
Manager
Demo AM 1.8.0 nightly build pack- https://svn.wso2.org/repos/wso2/scratch/chunk13-release/06-10-2014/
*
Demo : Designing APIs with WSO2 API
Manager
API Context -customer-service
API Version -v1
API Resources -
HTTP Method URL- Pattern Payload
GET /customers/{id} -
POST /customers {
"Customer":{"name":"user1","address":"cmb","age":6}
}
DELETE /customers/{id} -
PUT /customers {
"Customer":{"id":124,"name":"user1","address":"cmb","age":6}
}
*
Implementing APIs with WSO2 API
Manager
๏ Implement Inline as Prototyped APIs
-- Provide the ability to expose a developing API as a prototyped
API.
-- Prototyped APIs will provide early promotion for a RESTful API.
-- Can specify the sample implementation inline with Java-scripts.
-- Ability to get early feedbacks for APIs from API consumers
without subscribing.
*
Implementing APIs with WSO2 API
Manager
*
Demo : Implementing APIs as Prototyped
APIs with WSO2 API Manager
*
Implementing APIs with WSO2 API
Manager
๏ Implement with backend endpoint
-- Provide the ability to connect with the real backend
implementation.
-- Supported Endpoint Types
HTTP Endpoint - A REST service endpoint based on a URI template
Address Endpoint - The direct URL of the service
WSDL Endpoint - A WSDL as an endpoint
Failover Group - A group of endpoints connect in a fail-over
manner
Load Balance - A group of load-balanced endpoints
*
Implementing APIs with WSO2 API
Manager
*
Managing APIs with WSO2 API Manager
๏ Expose a well designed API as a managed RESTful API.
๏ Engage throttling,authorization and monitoring features to the
API.
๏ Managing through a life-cycle of API.
๏ Make it available for API consumers via subscriptions in APIStore.
*
Managing APIs with WSO2 API Manager
*
Demo : Managing APIs with WSO2 API
Manager
**
More Information
● http://wso2.com/products/api-manager/
● https://docs.wso2.com/display/AM170/Designing+APIs
● https://docs.wso2.com/display/AM170/Implementing+APIs
● https://docs.wso2.com/display/AM170/Managing+APIs
● http://swagger.io/
**
Business Model
Contact us !

More Related Content

What's hot

An Introduction to the WSO2 API Manager
An Introduction to the WSO2 API Manager An Introduction to the WSO2 API Manager
An Introduction to the WSO2 API Manager
WSO2
 

What's hot (20)

WSO2 API Platform: Vision and Roadmap
WSO2 API Platform: Vision and RoadmapWSO2 API Platform: Vision and Roadmap
WSO2 API Platform: Vision and Roadmap
 
Demystifying Open Banking
Demystifying Open BankingDemystifying Open Banking
Demystifying Open Banking
 
apidays London 2022 - How innovators are driving growth from API strategies, ...
apidays London 2022 - How innovators are driving growth from API strategies, ...apidays London 2022 - How innovators are driving growth from API strategies, ...
apidays London 2022 - How innovators are driving growth from API strategies, ...
 
Open banking [Evolution, Risks & Opportunities]
Open banking [Evolution, Risks & Opportunities]Open banking [Evolution, Risks & Opportunities]
Open banking [Evolution, Risks & Opportunities]
 
Architecting an Enterprise API Management Strategy
Architecting an Enterprise API Management StrategyArchitecting an Enterprise API Management Strategy
Architecting an Enterprise API Management Strategy
 
apidays London 2022 - Creating a high performing API Product Team, Ryan Cliff...
apidays London 2022 - Creating a high performing API Product Team, Ryan Cliff...apidays London 2022 - Creating a high performing API Product Team, Ryan Cliff...
apidays London 2022 - Creating a high performing API Product Team, Ryan Cliff...
 
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
 
Highlights of WSO2 API Manager 4.0.0
Highlights of WSO2 API Manager 4.0.0Highlights of WSO2 API Manager 4.0.0
Highlights of WSO2 API Manager 4.0.0
 
apidays London 2022 - Designing high-value data models with an API-first mind...
apidays London 2022 - Designing high-value data models with an API-first mind...apidays London 2022 - Designing high-value data models with an API-first mind...
apidays London 2022 - Designing high-value data models with an API-first mind...
 
WSO2 Open Banking: Digital Transformation Through PSD2
WSO2 Open Banking: Digital Transformation Through PSD2WSO2 Open Banking: Digital Transformation Through PSD2
WSO2 Open Banking: Digital Transformation Through PSD2
 
The Power Of Open Banking Coupled With Artificial Intelligence
The Power Of Open Banking Coupled With Artificial IntelligenceThe Power Of Open Banking Coupled With Artificial Intelligence
The Power Of Open Banking Coupled With Artificial Intelligence
 
IBM DataPower Gateway - Common Use Cases
IBM DataPower Gateway - Common Use CasesIBM DataPower Gateway - Common Use Cases
IBM DataPower Gateway - Common Use Cases
 
An Introduction to the WSO2 API Manager
An Introduction to the WSO2 API Manager An Introduction to the WSO2 API Manager
An Introduction to the WSO2 API Manager
 
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
API Gateway How-To: The Many Ways to Apply the Gateway PatternAPI Gateway How-To: The Many Ways to Apply the Gateway Pattern
API Gateway How-To: The Many Ways to Apply the Gateway Pattern
 
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1
 
Open Banking - Opening the door to Digital Transformation
Open Banking - Opening the door to Digital Transformation Open Banking - Opening the door to Digital Transformation
Open Banking - Opening the door to Digital Transformation
 
APIsecure 2023 - OAuth, OIDC and protecting third-party credentials, Ed Olson...
APIsecure 2023 - OAuth, OIDC and protecting third-party credentials, Ed Olson...APIsecure 2023 - OAuth, OIDC and protecting third-party credentials, Ed Olson...
APIsecure 2023 - OAuth, OIDC and protecting third-party credentials, Ed Olson...
 
Apigee Products Overview
Apigee Products OverviewApigee Products Overview
Apigee Products Overview
 
KYC automation using artificial intelligence (AI)
KYC automation using artificial intelligence (AI)KYC automation using artificial intelligence (AI)
KYC automation using artificial intelligence (AI)
 

Similar to API designing with WSO2 API Manager

Restful Integration with WSO2 ESB
Restful Integration with WSO2 ESB Restful Integration with WSO2 ESB
Restful Integration with WSO2 ESB
WSO2
 
Connectors for the New Enterprise with WSO2 ESB 4.8
Connectors for the New Enterprise with WSO2 ESB 4.8Connectors for the New Enterprise with WSO2 ESB 4.8
Connectors for the New Enterprise with WSO2 ESB 4.8
WSO2
 
Introducing API Manager 1.7
Introducing API Manager 1.7 Introducing API Manager 1.7
Introducing API Manager 1.7
WSO2
 
Application Development with API Manager
Application Development with API ManagerApplication Development with API Manager
Application Development with API Manager
WSO2
 
Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio
WSO2
 
Introduction to WSO2 Integration Platform
Introduction to WSO2 Integration PlatformIntroduction to WSO2 Integration Platform
Introduction to WSO2 Integration Platform
WSO2
 
Introducing The WSO2 Platform
Introducing The WSO2 Platform Introducing The WSO2 Platform
Introducing The WSO2 Platform
WSO2
 
Enterprise Single Sign On
Enterprise Single Sign On Enterprise Single Sign On
Enterprise Single Sign On
WSO2
 

Similar to API designing with WSO2 API Manager (20)

Restful Integration with WSO2 ESB
Restful Integration with WSO2 ESB Restful Integration with WSO2 ESB
Restful Integration with WSO2 ESB
 
Leveraging federation capabilities of identity server for api gateway
Leveraging federation capabilities  of identity server for api gatewayLeveraging federation capabilities  of identity server for api gateway
Leveraging federation capabilities of identity server for api gateway
 
Connectors for the New Enterprise with WSO2 ESB 4.8
Connectors for the New Enterprise with WSO2 ESB 4.8Connectors for the New Enterprise with WSO2 ESB 4.8
Connectors for the New Enterprise with WSO2 ESB 4.8
 
Introducing API Manager 1.7
Introducing API Manager 1.7 Introducing API Manager 1.7
Introducing API Manager 1.7
 
Application Development with API Manager
Application Development with API ManagerApplication Development with API Manager
Application Development with API Manager
 
API, Integration, and SOA Convergence
API, Integration, and SOA ConvergenceAPI, Integration, and SOA Convergence
API, Integration, and SOA Convergence
 
Top 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementationTop 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementation
 
Octo API-days 2015
Octo API-days 2015Octo API-days 2015
Octo API-days 2015
 
Six Steps To Build A Successful API
Six Steps To Build A Successful APISix Steps To Build A Successful API
Six Steps To Build A Successful API
 
Six Steps to Build Successful APIs
Six Steps to Build Successful APIsSix Steps to Build Successful APIs
Six Steps to Build Successful APIs
 
WSO2 Product Release Webinar - WSO2 API Manager 1.9
WSO2 Product Release Webinar - WSO2 API Manager 1.9WSO2 Product Release Webinar - WSO2 API Manager 1.9
WSO2 Product Release Webinar - WSO2 API Manager 1.9
 
Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio
 
Introduction to WSO2 Integration Platform
Introduction to WSO2 Integration PlatformIntroduction to WSO2 Integration Platform
Introduction to WSO2 Integration Platform
 
Extend soa with api management Sangam18
Extend soa with api management Sangam18Extend soa with api management Sangam18
Extend soa with api management Sangam18
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIs
 
Introducing The WSO2 Platform
Introducing The WSO2 Platform Introducing The WSO2 Platform
Introducing The WSO2 Platform
 
Api-First service design
Api-First service designApi-First service design
Api-First service design
 
Enterprise Single Sign On
Enterprise Single Sign On Enterprise Single Sign On
Enterprise Single Sign On
 
API Webinar November 18th 2014
API Webinar November 18th 2014API Webinar November 18th 2014
API Webinar November 18th 2014
 

More from WSO2

More from WSO2 (20)

Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
WSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the CloudWSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the Cloud
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 

API designing with WSO2 API Manager

  • 1. Last Updated: Jan. 2014 Roshan Wijesena & Lalaji Sureshika API Designing with WSO2 API Manager WSO2 API Manager Team
  • 2. ** About the Presenters ๏ Roshan joined WSO2 in march 2014.He is a senior software engineer in the WSO2 API manager team.Prior to joining WSO2, Roshan worked at webgurus as a Senior PHP developer where he was responsible for designing, developing and maintaining complex human resource management applications. ๏ Lalaji joined WSO2 in September 2010. She is a senior software engineer in the WSO2 API Manager team where her main focus is on the development of the product. In addition to her product development efforts she has provided development support and technology consulting on customer engagements, including customer QuickStart programs.
  • 3. * About WSO2 * ๏ Global enterprise, founded in 2005 by acknowledged leaders in XML, web services technologies, standards and open source ๏ Provides only open source platform-as-a-service for private, public and hybrid cloud deployments ๏ All WSO2 products are 100% open source and released under the Apache License Version 2.0. ๏ Is an Active Member of OASIS, Cloud Security Alliance, OSGi Alliance, AMQP Working Group, OpenID Foundation and W3C. ๏ Driven by Innovation ๏ Launched first open source API Management solution in 2012 ๏ Launched App Factory in 2Q 2013 ๏ Launched Enterprise Store and first open source Mobile solution in 4Q 2013
  • 5. * What is an API ๏ A = Application P = Programming I = Interface ๏ An interface used by software components to communicate with each other - Wikipedia ๏ Example. My app API calls Facebook infrastructure Interfaces
  • 6. * Why is a good API important? ● API providers ○ Brand building as a marketing tool. ○ Increase interest in the company products and services. ○ Increase website traffic. ● API consumers ○ Integration with other great services/infrastructures ○ Customizable data.
  • 7. * REST API ๏ Representational State Transfer is an architectural style that abstracts the architectural elements within a distributed hypermedia system- wikipedia ๏ Is it easy to develop a great REST api? answer is NO. ๏ It should be extremely easy to use for the consumer.
  • 8. * Key Elements of a REST API ๏ Verbs ๏ Endpoints ๏ Status code ๏ Filtering ๏ Versioning
  • 9. * Good design Resource Sample GET POST PUT DELETE api/v1/orders Get the list of orders Creates a new order Batch update of orders return error Status code 200 OK 201 CREATED 201 CREATED 400 BAD-REQUEST api/v1/orders/100 Gets a single order Return an error Update a single order Delete an order Status code 200 OK 400 BAD- REQUEST 201 CREATED 204 NO CONTENT
  • 10. * Characteristics of good REST API design ๏ Intuitive ๏ Documentation ๏ Analytics ๏ Stability and Consistency ๏ Security
  • 11. * Intuitive ๏ Predictable meaningful URLs ๏ Ex-/customers/100/orders/114 ๏ Nouns not verbs ๏ Base URL is important. ๏ Ex : http://api.pizza.com ๏ Bad practice old RPC style ๏ /getOrders ๏ /getUsers ๏ Best practice ๏ /Orders ๏ /Orders/1
  • 12. * Documentation ๏ Should be easy to find and publicly accessible ๏ Show examples of complete request/responses/HTTP status codes. ๏ Give some cURL examples that can directly paste in to terminal and allow to see results. ๏ Clearly define depreciations/updates ๏ Documentation tools. ex Swagger.
  • 13. * Stability and Consistency ๏ Less volatile API. ๏ support older version of apis quite longer time ๏ maintain versioning properly. ๏ Internal consistency. ๏ Should not change parameter names and methods ๏ same naming conventions throughout entire API ๏ Record and publish changelog. ๏ publish any updates globally that everybody can access.
  • 14. * Analytics ๏ Keep track of the version/endpoints of your API being used by Consumers ๏ The most commonly used API calls should be made efficient. ๏ You can contact third party developer and let them know updates ๏ Analytics tools.
  • 15. * Security ๏ Should be simple must not be difficult to get authenticated ๏ no need to reinvent the wheel. Use existing protocols. ๏ Avoid sessions when possible ๏ Authorized based on resource content not based on URL. ๏ Use api keys instead of username/password. ๏ Basic Auth. ๏ oAuth 2.0 + SSL. ๏ Openid connect 1.0.
  • 16. * Sample of uncompleted JAX-RS REST API๏ GET ๏ /Customers ๏ POST ๏ /Customers ๏ {"Customer":{"name":"lalaji","address":"hello","age":2}} ๏ PUT ๏ /Customers/{id} ๏ DELETE ๏ /Customers/{id} ๏ No Baseurl ๏ No versioning ๏ No security ๏ No multiple response type
  • 17. * WSO2 API Manager ๏ WSO2 API Manager is a complete solution for designing, implementing and managing APIs. ๏ It comes with an out of the box API Publisher which allows you to design your API and convert it to a managed API. ๏ API Publisher provides a rich set of capabilities to -- Design -> Plan and design a good RESTful API -- Implement -> Deploy and test as a prototyped API -- Manage -> Publish and expose as a managed RESTful API
  • 19. * Designing APIs with WSO2 API Manager https://ip:port/publisher/
  • 20. * Designing APIs with WSO2 API Manager ๏ Document API in Style -Swagger 2.0 A powerful representation of a RESTful API. An open source framework implementation to describe,visualize and consume a RESTful API. It provides interactive documentation support. It’s a declarative resource specification,which consumers could understand and consume services without knowledge of server implementation.
  • 21. * Designing APIs with WSO2 API Manager
  • 22. * Demo : Designing APIs with WSO2 API Manager Demo AM 1.8.0 nightly build pack- https://svn.wso2.org/repos/wso2/scratch/chunk13-release/06-10-2014/
  • 23. * Demo : Designing APIs with WSO2 API Manager API Context -customer-service API Version -v1 API Resources - HTTP Method URL- Pattern Payload GET /customers/{id} - POST /customers { "Customer":{"name":"user1","address":"cmb","age":6} } DELETE /customers/{id} - PUT /customers { "Customer":{"id":124,"name":"user1","address":"cmb","age":6} }
  • 24. * Implementing APIs with WSO2 API Manager ๏ Implement Inline as Prototyped APIs -- Provide the ability to expose a developing API as a prototyped API. -- Prototyped APIs will provide early promotion for a RESTful API. -- Can specify the sample implementation inline with Java-scripts. -- Ability to get early feedbacks for APIs from API consumers without subscribing.
  • 25. * Implementing APIs with WSO2 API Manager
  • 26. * Demo : Implementing APIs as Prototyped APIs with WSO2 API Manager
  • 27. * Implementing APIs with WSO2 API Manager ๏ Implement with backend endpoint -- Provide the ability to connect with the real backend implementation. -- Supported Endpoint Types HTTP Endpoint - A REST service endpoint based on a URI template Address Endpoint - The direct URL of the service WSDL Endpoint - A WSDL as an endpoint Failover Group - A group of endpoints connect in a fail-over manner Load Balance - A group of load-balanced endpoints
  • 28. * Implementing APIs with WSO2 API Manager
  • 29. * Managing APIs with WSO2 API Manager ๏ Expose a well designed API as a managed RESTful API. ๏ Engage throttling,authorization and monitoring features to the API. ๏ Managing through a life-cycle of API. ๏ Make it available for API consumers via subscriptions in APIStore.
  • 30. * Managing APIs with WSO2 API Manager
  • 31. * Demo : Managing APIs with WSO2 API Manager
  • 32. ** More Information ● http://wso2.com/products/api-manager/ ● https://docs.wso2.com/display/AM170/Designing+APIs ● https://docs.wso2.com/display/AM170/Implementing+APIs ● https://docs.wso2.com/display/AM170/Managing+APIs ● http://swagger.io/