How to migrate an existing API from WSO2 API Cloud to Choreo

Chathura Karunanayaka
Choreo Tech Blog
Published in
3 min readAug 4, 2023

This article is about migrating already existing APIs from WSO2 API Cloud to the WSO2 Choreo platform. In this example we assume that you already have APIs created and running in WSO2 API Cloud hence we will not cover how to create an API on WSO2 API Cloud in this article. However, if you’re interested in knowing how to create an API please follow the documentation [1].

Choreo is an internal developer platform designed to accelerate the creation of digital experiences. With Choreo, you can effortlessly build, deploy, monitor, and manage your cloud native applications. Choreo is a complete platform for enterprise-grade API-first development to create, deploy, run, and manage APIs and services, which integrate perfectly with your development practices with multiple environments. Deploy to the Choreo cloud or to any private cloud within minutes.

Without further ado let’s jump right into migrating the APIs,

For this example I created a sample API called status_check on WSO2 API Cloud and we will be migrating that API to Choreo (Note — that this example shows how to migrate an API which does not have custom meditations).

1) Firstly, you need to download the API’s definition file from the WSO2 API Cloud publisher portal by selecting the DOWNLOAD SOURCE button as shown below.

2) After downloading the source file, open the file with a preferred code editor and add the host parameter to the definition file (Note — if it is missing in the definition file you might be prompted with errors when importing the API to Choreo).

“Host”:”<backend URL ex — backend.com>”,

3) the current definition is in openAPI version 2.0, lets convert this to openAPI version 3.0, which is the recommended version for Choreo, (Tips : for the conversion you can use the swagger editor, which you can download from [2]). When checking the swagger file in the swagger editor make sure there are no errors.

4) After converting the file, lets import the API definition to Choreo. If you do not already have an organization in Choreo, you can simply go into [3] and create an organization.

5) Inside the organization you can create projects and you can create the components within the project. In this case since we are migrating an API from WSO2 API Cloud to Choreo let’s use the Rest API Proxy component.

6) Import the converted swagger definition to the Rest API Proxy, and then fill the required fields.

7) Navigate into the deploy page and deploy the API as shown below.

8) you’re all set now you can simply navigate to the Test console and test the API and see if everything is working as expected [4] .

[1] — https://cloud.docs.wso2.com/en/latest/learn/tutorials/create-and-publish-an-api/

[2] — https://swagger.io/tools/swagger-editor/download/

[3] — https://wso2.com/choreo/

[4] — https://wso2.com/choreo/docs/testing/test-rest-endpoints-via-the-openapi-console/

--

--