Hi Akshitha, Based on what you have said so far seems that this can easily be achieved by chaining these 5 commands together in a script. Cloud you give some details about the kind of automation you are trying to introduce with your project?
On Thu, 6 Aug 2020 at 13:40, Akshitha Dalpethado (Intern) <[email protected]> wrote: > Basically what we are trying to achieve through this project is to give > our wso2 apim users the ability to extract API's created on AWS API Gateway > from a specific account to the WSO2 developers portal by extracting the > swagger definition of an API created in the AWS using the AWS Command Line > Interface (AWS CLI). > > First we will be requesting for the API's a user has created in the AWS > APIG which will return the API's created in the AWS APIG (from a specific > account) and their ID's and also we will be requesting for the API Stage > names which is also required to extract the swagger definition of a API > from AWS APIG using AWS CLI. > > > *Command01: aws apigateway get-rest-apisCommand02: aws apigateway > get-stages --rest-api-id <api_id>Command03: aws apigateway get-export > --rest-api-id <api id> --stage-name <SN> --export-type swagger > /path/file_name.json* > > Then we initialize an API project using WSO2 API CTL using the swagger > definition we extracted from the AWS APIG. > *Command: ./apictl init <project_name> --oas path/file_name.json* > > Then we can import the initialized API project to the WSO2 Developers > portal as an API by using the following API CTL command. > *Command: ./apictl import-api -f <path_to_API_project> -e <environment> -k* > > This is how it can be done manually but our goal is to automate this > process and allow users to extract API's they have created in the AWS APIG > to the WSO2 Developers portal. > > > > > > -- > *Akshitha Dalpethado* | Intern | WSO2 Inc. > > (m) :0770284542 | Email : [email protected] > > [image: http://wso2.com/signature] <http://wso2.com/signature> > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > -- Regards, Uvindra Mobile: 777733962
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
