问题
I tried to export/import an API from one environment to other environment, where as Exporting is working fine but facing issues while Importing an API from Local/Environment
I have used api-import-export-2.6.0.war with APIM-2.6.0,
Command used to Import api: apimcli import-api -f G:/Petstore_1.0.0.zip -e dev
Error importing API Reason: C:\Users\RAVIKU~1\AppData\Local\Temp\apim130994779\Petstore_1.0.0\Meta-information\api was not found as a YAML or JSON Exit status 1
回答1:
Did you try giving the import API command the API file name as <environment>/file_name
; where <environment>
is the environment where the zip file exists[1].
apimcli import-api -f <environment>/Petstore_1.0.0.zip -e dev
[1].https://docs.wso2.com/display/AM260/Migrating+the+APIs+and+Applications+to+a+Different+Environment#MigratingtheAPIsandApplicationstoaDifferentEnvironment-ImportinganAPI
回答2:
The version of the API Import and Export web application is compatible with the WSO2 WUM. Meanwhile please check with that also.
来源:https://stackoverflow.com/questions/57816530/importing-migrating-an-api-from-local-repo-environment-to-other-environment