Bulk exporting of API’s in WSO2 API Manager

WSO2 API Manager is really powerful Opensource API Management tool that would allow you to expose, secure, manage and monitor API’s exposed via the API Manager. The product now comes with a nice feature to export/import API’s from and to the API Manager deployment. This feature comes in handy when you want to migrate API’s from one environment to another or when you want to copy an API from one API Manager to another. The feature is exposed as a RESTful API that can be invoked from a REST client, CuRL or a 3rd party script.

The limitation of the current implementation is that it only allows a single API to be exported at once. This is fine for majority of use-cases but there may be some instances where you may have 100’s of API’s and it might not be practical to export each and every API individually. To avoid this situation I have written the following tool that would allow you to do a Bulk export of API’s from the API Manager. The code and the instructions on how to use this tool can  be found in the following GIT repo.





3 thoughts on “Bulk exporting of API’s in WSO2 API Manager

  1. I have tried the APIBulk export tool to export 2 APIs from my WSO2-AM-2.2.0.
    The configurations done and build was success.
    When running the jar file (java -jar APIBulkExport-1.0-SNAPSHOT.jar), I am getting this error.
    “API List requested from API Manager is in wrong formatUnexpected character (<) at position 28."
    I am not sure whether this error is due to API Manager or tool.
    Requesting your help in this.


      • Hi Nadeesha,

        I need to bulk export APIs from one APIM 2.1.0 to another similar setup. The zip files of the exported APIs are not getting unzipped. Facing the error “error while opening archive file” when manually extracting and in cmd line (unzip cmd), getting the error
        “Archive: APIexportgetToken.zip
        End-of-central-directory signature not found. Either this file is not
        a zipfile, or it constitutes one disk of a multi-part archive. In the
        latter case the central directory and zipfile comment will be found on
        the last disk(s) of this archive.
        unzip: cannot find zipfile directory in one of APIexportgetToken.zip or
        APIexportgetToken.zip.zip, and cannot find APIexportgetToken.zip.ZIP, period.”
        Is the way of zipping done is right?
        Another doubt is when I am importing the APIs in another setup, I am facing the error 403 forbidden. The authentication is not a problem in my case (basic auth/oauth in the beans.xml). So, whether this has anything to do with zip files?
        To sum up,
        Export of APIs as zip is happening, but cannot unzip it.
        Import of those APIs – error 403 forbidden

        Requesting your help in this asap.
        Thanks in advance.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s