Task1 - Exporting a given API from one environment and Importing to
Proposed solution :-
Migrating the APIs to a Different Environment is one of the major functionalities that should be achieved through the tool. When migrating an API manager from one server environment to another environment, it will be more effective if there’s a way to move all created API’s in the first environment to the other environment since no need to create the API’s again in the new environment. The tool is developed focusing on the API management systems that consuming RESTful APIs to retrieve API’s data from data sources.
When user sends a request to export an API the Oauth token which was generated in the OAuth2 authentication process will be appended as a header in the relevant http call to secure the functionality. After user sends the request all the information required for the requested API will be retrieve through REST API invocations from the data sources. After executing the relevant command it will generates a portable .zip file which includes all the entities bundled together and which can be downloaded. In the .zip file the Meta information which contains all the basic information required for an API to be imported in another environment and the API swagger definition, documents which contains the summary of all the documents available for the API, thumbnail image of the API, WSDL file of the API and the sequences available for the API will be available.
The same zip archive which was created in the export functionality can be used for importing the API into the API Manager. It is required to call rest APIs to import an API, the request includes the data to be sent on the request as the payload and also includes Oauth token as the header for each REST call to ensure the security. If the request is successful the response with 200 will be returned. Unzip of the archive will be done by configuring the basic token key and OAuth2 access token which were created in the authentication process to provide a more secure service. After that the API will be created in the imported environment.
No comments:
Post a Comment