Cloud Blog

Migrating APIs between Cloud and Non-Cloud Environments

One of the key advantages of WSO2 API management platform is that the same platform can be run by you on premises, run by WSO2 as dedicated Managed Cloud, or used as a service from WSO2 API Cloud.

We now officially support migrating your APIs between the deployments. This is done via Export-API / Import-API endpoints exposed by WSO2 API Manager & WSO2 API Cloud.

For example, you can use Export-API to export your API from WSO2 API Cloud to a local zip file, and then use Import-API to import this zip into a Managed Cloud dedicated API Manager:

API Export Import

1. Exporting API

To export an API, invoke command like:

curl -H "Authorization:Basic <base64-encoded-credentials-separated-by-a-colon>" -X GET "https://api.cloud.wso2.com/api-import-export-2.1.0-v2/export-api?name=<api-name>&version=<api-version>&provider=<api-provider>" -k > <zip-file-name>

Parameters:

  • <base64-encoded-credentials-separated-by-a-colon>: go to https://www.base64encode.org/ and encode the domain-qualified administrative username (grab it at the top right of the API Cloud user interface) separated by colon from your API Cloud password, for example:

Base 64 Encoding

  • name=<api-name>&version=<api-version>&provider=<api-provider>“: simply copy the URL from the browser, when you open that API in API Cloud:

API id from URL

  • <zip-file-name>: just the name of the zip file to which you want to export the API.

Example:

You actual command might look like:

curl -H "Authorization:Basic bmFtZS5kb21haW4uY29tQGNvbXBhbnk6UGFzc3dvcmQ=" -X GET "https://api.cloud.wso2.com/api-import-export-2.1.0-v2/export-api?name=Phones&version=1.0&provider=name.domain.com@company" -k > MyExportedAPI.zip

2. Importing API

To import API to your own on-premises or Managed Cloud API Manager deployment, use the import-api call:

curl -H "Authorization:Basic<base64-encoded-credentials-separated-by-a-colon>" -F file=@"<full-path-to-the-zip-file>" -k -X POST "https://<APIM_HOST:Port>/api-import-export-2.1.0-v2/import-api?preserveProvider=false"

Parameters:

  • <base64-encoded-credentials-separated-by-a-colon>: same as described in the Export section above,
  • <APIM_HOST:Port>: URL and port of the API Manager Publisher,
  • <full-path-to-the-zip-file>: full path to the zip file that you created when exporting the API.

Example:

You actual command might look like:

curl -H "Authorization:Basic YWRtaW46YWRtaW4=" -F file=@"/Users/user1/Desktop/MyExportedAPI.zip" -k -X POST "https://apim.domain.com/api-import-export-2.1.0-v2/import-api?preserveProvider=false"

Notes

  • You can use the same API to migrate your APIs from on-premises deployment to public cloud, between public cloud organizations, between various API Manager deployments, and so on. Just make sure that you use proper URLs and administrative credentials, as described in this tutorial,
  • Your on-premises API Manager deployment needs WAR file with Export/Import API implementation, download and install this file as described here,
  • Make sure that API Manager version is identical at the source and target locations,
  • Imported API will have the “CREATED” lifecycle status so you can modify it further before publishing it to users,
  • If target environment does not have subscription tier used by the API, you will have to assign the proper tier manually,
  • If exported sequence is not available in the target environment it is created.

Try it in API Cloud today.

Tracking Geographic Locations of API Invocations

We have added geographic reporting support to API Cloud‘s Google Analytics integration.

Now if you integrate your API with your Google Analytics account as described here, your Audience / Geo / Location report will tell you where your API users are coming from:

Google Analytics Geo report for web APIs

You can obviously still also use API Cloud’s own analytics as well as  all the other Google Analytics reports (real-time and historical) that we have been supporting previously, and combine them or filter them by user geography.

Set up Google Analytics for your REST and SOAP APIs now and get deeper insight into your subscriber-base and their usage patterns.

Monetize Your APIs with WSO2 API Cloud

APIs are a great enabler of your core business and they can also be a revenue stream of their own.

Monetizing your APIs can be a daunting endeavor: you need to collect and store payment information, ensure PCI compliance, create subscription and billing workflows, integrate them with the statistics system, do customer invoicing and self-service billing information access, maybe implement freemium models and so on, and so forth.

Luckily all of this can now be handled by WSO2 API Cloud!

All you need to do is enable Monetization by clicking the corresponding menu item:

EnablingMonetizationNew

Once Monetization is enabled and you created all the subscription tiers you need, you can turn any of the tiers into commercial plans:

EditTier-Making it commercial

And provide the pricing information:

Defining API payment plan

You can then customize your invoices and billing emails, provide us with your bank account information – and start receiving your revenue (minus the 5% commission that WSO2 will hold).

Follow full instructions on API monetization setup in our documentation, and turn your APIs into revenue generator!

 

May 31 Webinar on WSO2 Cloud Latest News and Roadmap

On Tuesday, May 31, 2016, I will be giving a webinar on the current state and future directions of WSO2 Cloud – our shared cloud service.

Cloud roadmap webinar sm

I will be demoing and talking about the latest updates to both API Cloud (to which we are finally adding API Monetization capabilities!) and Integration Cloud (that got a complete revamp, is now based on the docker/Kubernetes architecture, no longer has compatibility limitations, and besides Java also includes microservices and PHP).

I will also talk about the future roadmap including our Identity Cloud and Integration Cloud plans.

And I will be very happy to answer any questions that you have. This is a great opportunity for us to talk to learn more from each other.

Please register at the webinar page to reserve your spot: WSO2 Cloud Platform: Vision and Roadmap

Categories

Recent Posts

Most Popular Posts