Pages

Monday, March 2, 2015

Create API and Publish using WSO2 API Manager

WSO2 API Manager is a complete solution for designing and publishing APIs, creating and managing a developer community, and for scalable routing API traffic. It leverages proven, production-ready integration, security, and governance components from the WSO2 Enterprise Service BusWSO2 Identity Server, and WSO2 Governance Registry. In addition, it leverages the WSO2 Business Activity Monitor for Big Data analytics, giving you instant insight into APIs behavior.

This article explains how to create and publish API in WSO2 API Manager. Here we are using http://www.webservicex.net/country.asmx web service and publish it as an API.

Prerequisite
WSO2 API Manager 1.5 or above

Steps
1. Download and unzip WSO2 API Manager
2. Start WSO2 API Manager.

3. Goto http://localhost:9763/publisher and login to publisher portal. (Default credentials user name : admin, password : admin)

4. Click Add and enter values as follows.

















Once complete entering above value click Implement.


5. Enter values in next screen as follows and click manage. Enter correct service endpoint under Production Endpoint.













6. Enter values in next screen as follows and click Save & Publish

















After completing above steps, you have an API published.

7. Go to https://localhost:9443/store/ and login to store portal.

8. Go to My Subscriptions and Click on the API created on the left hand list. Click Subscribe and Click Go to My Subscription from popup window.

Note. Copy Production and Sandbox URL under overview for later use.


















9. Click Generate button under Keys-Production to generate access token.

















10. Go to Tools - >RESTClient and invoke API. Make sure to use correct entries for access token and URL. Following image illustrate required information.