This add-on is operated by WSO2
Scalable API management as a service
WSO2 API Cloud
Last updated 27 March 2018
The WSO2 API Cloud add-on is currently in beta.
Table of Contents
WSO2 API Cloud is an add-on that enables you to turn Heroku-hosted web services into fully managed APIs. It is a publicly hosted version of the award-winning, open-source WSO2 API Manager. Using WSO2 API Cloud, you can:
Design your APIs and provide a unified development experience for application developers.
Set up a themeable, customizable Developer Portal (API Store) at your own URL.
Manage the developer community by allowing self-signup and blocking subscriptions.
Use API monetization capabilities and support free, commercial, and freemium models.
Implement access control on APIs using industry standards such as OAuth and SAML.
Automatically scale to meet the needs of any API demand.
Route API traffic through a highly scalable API Gateway, orchestrate, and transform calls and responses.
Monitor API usage and performance using analytics, reports, alerts, and automated fraud detection.
Provisioning the add-on
WSO2 API Cloud can be attached to a Heroku application via the CLI:
A list of all plans available can be found here.
$ heroku addons:create wso2apicloud -----> Adding wso2apicloud to sharp-mountain-4005... done, v18 (free)
After you install WSO2 API Cloud, your application should be configured to fully integrate with the add-on.
Spin up a simple REST service
Clone this sample Node.js REST service app:
$ git clone https://github.com/wso2/cloud-heroku-samples.git $ cd cloud-heroku-samples
This app implements a simple echo service that takes a text parameter and returns the word
Helloalong with the provided parameter.
Create a new Heroku app:
$ heroku create -----> Creating https://warm-dawn-12833... done, -----> https://warm-dawn-12833.herokuapp.com/ | https://git.heroku.com/warm-dawn-12833.git
Deploy the sample code to it:
$ git push heroku master
Ensure that you have at least one instance of the service running:
$ heroku ps:scale web=1
Verify that your web service is running by appending
/hello?name=Worldto your Heroku app’s root URL (e.g.,
https://warm-dawn-12833.herokuapp.com/hello?name=World) and navigating to it in your browser:
Create a WSO2 API Cloud account
Access the WSO2 API Cloud dashboard via the CLI:
$ heroku addons:open wso2apicloud Opening guru301 for sharp-mountain-4005
or by visiting the Heroku Dashboard and selecting the application in question. Select WSO2 API Cloud from the Add-ons menu.
- If you do not have an account in WSO2 Cloud, the UI directs you to create one.
- If you already have an account in WSO2 Cloud, select the organization that you want to associate with your Heroku account.
After you complete the signup process, your dashboard opens:
Define a managed API
From your WSO2 API Cloud dashboard, click New API…
Select Design a New REST API and click Start Creating.
Provide a display name (e.g.,
Heroku), a context, which is the URL of your API (e.g.,
heroku), and a version (e.g.,
In the API Definition section, enter
helloas the URL Pattern and select the GET checkbox. Click Add.
Expand your new
/helloGET method and add a new parameter called
Expand the Managed API section and provide your Heroku app’s root URL as the Production endpoint:
Set Unlimited as your API’s tier:
For now, set API security to
Click Save & Publish.
Click Go to API Store to open your API in the API Store, which is the developer portal of the API Cloud:
In the API Store, click the API Console tab.
Expand your API’s
/hellomethod, provide a value to the name parameter (e.g.,
World), and click Try it out.
The API calls your backend service in Heroku and shows the execution results.
You have successfully created a managed API based on your Heroku service.
For more information on the features available within the WSO2 Cloud, please see the docs at WSO2 API Cloud Documentation.
WSO2 API Gateway as a Heroku Dyno
WSO2 API Gateway can be deployed as your own Heroku dyno. This reduces the average response time to serve an API call, which performs all the functions, without the need to connect to other API management components.
Try WSO2 API Gateway with direct deployment on Heroku:
There are multiple advantages to this deployment model:
- Performance: You can put your API gateway close to your backend services and API subscribers, avoiding the costly extra hops to the cloud and back.
- Security and Compliance: API calls and payload data does not leave your network. This keeps your security and compliance officers happy.
- Connectivity: Your API gateway is running on Heroku, so you do not have to set up a VPN or another alternative to expose your Heroku backend to the internet.
- Low Total Cost of Ownership (TCO): Most of the infrastructure is run and maintained by WSO2 for you.
Migrating between plans
Application owners should carefully manage the migration timing to ensure proper application function during the migration process.
heroku addons:upgrade command to migrate to a new plan.
$ heroku addons:upgrade wso2apicloud:medium -----> Upgrading wso2apicloud:medium to sharp-mountain-4005... done, v18 ($768/mo) Your plan has been updated to: wso2apicloud:medium
Removing the add-on
You can remove WSO2 API Cloud via the CLI:
This will destroy all associated data and cannot be undone!
$ heroku addons:destroy wso2apicloud -----> Removing wso2apicloud from sharp-mountain-4005... done, v20 (free)
If you remove the WSO2 API Cloud add-on, your account at WSO2 API Cloud will be disabled one month after the next billing date.
All WSO2 API Cloud add-on related issues should be submitted via one of the Heroku Support channels. Any API management related issues in the WSO2 API Cloud should be submitted to email@example.com or via the contact support UI in WSO2 API Cloud.