One of the key advantages of WSO2 API management platform is that the same platform can be run by you on-premise, 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:
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:
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:
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
Try it in API Cloud today.