Hi all,

We are in the process of introducing API Export and Import feature for WSO2
API Manager.

This feature can be used in scenarios such as moving APIs from staging to
production environment.

*API Export*

   - This operation mainly sends an archive which consists of all the
   required resources for a API to be recreated in another API Manager
   instance.
   - We have identified following folder structure to be included in the
   archive

​

​
*API Import*

   - Import feature accepts an API archive with the above mentioned
   structure and create a new API under current provider.

*Feature Implementation*

   - Generating archive (in API export) and extracting archive (in API
   import) can either be done in server or client side
   - Currently we are planning to develop a RESTful API for export and
   import functionality where archive generation for requested APIs and all
   the related functionality are taken place in the server side.
   - Decision for server side implementation was mainly made due to high
   number of network calls and high possibility of network failures that can
   happen in client side.
   - The RESTful service is halfway done. currently it can export and
   import meta information only.
      - *Export API* method calls
org.wso2.carbon.apimgt.api.APIProvider.getAPI(APIIdentifier)
      and transforms received API object to a json file.
      - *Import API* method receives json file via RESTful call and
      converts the json to an API object. This object is then sent to
      org.wso2.carbon.apimgt.api.APIProvider.addAPI(api) method and a new
      API will get created.
   - Several concerns can arise with this implementation approach
      1. API object can have environment specific details which are not
      compatible with the  importing environment
      2. There are some customisable attributes such as tiers (Ex : tiers
      in exporting environment may not be available in importing side)
which may
      not be available on the importing environment
   - Therefore we would like to know whether there is a better approach for
   implementing this.

Suggestions and ideas for implementing this export import API feature is
highly welcome.

Thank you.


-- 
Best Regards,

*Thilini Cooray*
Software Engineer
Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
E-mail : [email protected]

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to