Extensible API Management
-
Upload
wso2 -
Category
Technology
-
view
608 -
download
1
description
Transcript of Extensible API Management
WSO2 Advantage Webinar
Extensible API Management
Nuwan DiasSenior Software Engineer, WSO2
15/10/2013
About WSO2
• Providing the only complete open source componentized cloud platform
– Dedicated to removing all the stumbling blocks to enterprise agility– Enabling you to focus on business logic and business value
• Recognized by leading analyst firms as visionaries and leaders– Gartner cites WSO2 as visionaries in all 3 categories of
application infrastructure– Forrester places WSO2 in top 2 for API Management
• Global corporation with offices in USA, UK & Sri Lanka– 200+ employees and growing
• Business model of selling comprehensive support & maintenance for our products
150+ globally positioned support customers
Agenda
• Evolution of APIs
• Why should an API be extensible
• Designing an extensible API
• Real World Use Cases
Evolution of APIs
• Companies used phone, mail, advertising to reach customers.
• Then came websites, where companies advertised themselves.
• WAP versions of websites....... very limited success.
• Mobile web browsers did not live up to its potential
• Companies started building their own Apps (Applications)
• ** If you could reach your consumers through your Apps, how much further can you reach through Apps developed by a developer community.
What is Extensibility ?
• Hooks or plug-points to insert one's own programming routines
to the incoming and/or outgoing message flows.
Why should an API be extensible ?
• Helps you to reach the long tail...
• Longer lifetime of the API
• Enables your API to connect to other libraries or entire Applications
• Helps you get over mistakes.
Designing an Extensible API.
• Always return a consistent wrapper Object
– Ex: A successful response for a database query.<product> <name>Swiss Watch</name> <category>Watches</category> <color>Black</color> </product>
– When no data found<error>No Data Found</error>
– A better approach would be <response> <errorCode>0</errorCode> <product> <name>Swiss Watch</name> <category>Watches</category> <color>Black</color> </product> </response>
Designing an Extensible API.....
• Support Multiple Formats
– Ex: XML/JSON
• Keep parameter count consistent
• Support API Versioning
• Keep response key types consistent
– Ex: If you have an API that returns <bookid type=”integer”>12831</bookid>
– Do not have another api which returns <bookid>
• Structure the API URL– Ex: http://myproducts.com/{api}/{resource}
http://myproducts.com/products/product/1
http://myproducts.com/products/category/electronics
Designing an Extensible API.....
• Use OAuth
• Document your API religiously
Real World Use Cases
• Conversion from XML to JSON
Real World Use Cases
• Location Based Dispatching
Questions ?
Engage with WSO2
• Helping you get the most out of your deployments• From project evaluation and inception to development
and going into production, WSO2 is your partner in ensuring 100% project success
Engage with WSO2