WSO2 API Manager APICTL Commands
WSO2 API Manager apictl commands
APICTL version used
Version: 3.2.4
Build Date: 2021-10-12 03:45:30 UTC
Step#1 Environment Add & Remove
apictl add-env -e dev --apim <APIM_URL>
apictl add-env -e dev --apim <APIM_URL>
apictl add-env -e dev --apim https://localhost:9443
apictl remove env <ENV>
apictl remove env dev
Step#2 List environment
apictl list envs
Step#3 Login to the environment
apictl login <ENV> -u <USERNAME> -p <PASSWORD> -k
apictl login dev -u admin -p admin -k
apictl set --export-directory D:\APIMLab\export [path belongs to windows]
Step#5 List APIs
apictl list apis -e <ENV> -k
apictl list apis -e dev -k
Step#6 Export 1 API
apictl export-api -n <API-name> -v <version> -r <provider> -e <environment> -k
apictl export-api -n HelloWorld -v 1.0.0 -r admin -e dev -k
Other options
apictl export-api --name <API-name> --version <version> --provider <provider> --environment <environment> -k
apictl export-api -n <API-name> -v <version> -r <provider> -e <environment> --preserveStatus=<preserve-status> --format <export-format> -k
apictl export-apis --environment <ENV> -k
apictl export-apis --environment dev -k
apictl import-api -f <path-to-API-archive> -e <environment> -k
apictl import-api --file D:\APIMLab\export\apis\dev\HelloWorld_1.0.0.zip --environment dev -k
Other options
apictl import-api --file <path-to-API-archive> --environment <environment> -k
apictl import-api --file <path-to-API-archive> --environment <environment> --preserve-provider=<preserve_provider> --update=<update_api> --skipCleanup=<skip-cleanup> --params <environment-params-file> -k
Step#9 Export Application
apictl export-app -n <application-name> -o <owner> -e <environment> -k
---------------------------------------------------------------------------------------------------------
apictl export-app --name TestApplication --owner admin --environment dev --withKeys=true -k
---------------------------------------------------------------------------------------------------------
Other Options
apictl export-app -n <application-name> -o <owner> -e <environment> -k
apictl export-app --name <application-name> --owner <owner> --environment <environment> -k
apictl export-app --name <application-name> --owner <owner> --environment <environment> --withKeys=<with-keys> -k
Step#10 Import Application
apictl import-app -f <file> -e <environment> -k
apictl import-app --file <file> --environment <environment> -k
apictl import-app -f <file> -e <environment> -s=<skip-subscriptions> -o <owner> --skipKeys=<skip-keys> -k
---------------------------------------------------------------------------------------------------------
apictl import-app -f D:\APIMLab\export\apps\dev\admin_TestApplication.zip -e testenv
---------------------------------------------------------------------------------------------------------
apictl import-app -f dev/admin_SampleApp.zip -e production
apictl import-app --file dev/admin_SampleApp.zip --environment production
apictl import-app -f dev/admin_SampleApp.zip -e production -o admin --skipSubscriptions=true --skipKeys=true
apictl import-app -f dev/admin_SampleApp.zip -e production --preserveOwner=true
apictl import-app -f dev/admin_SampleApp.zip -e production --update=true
Ref: https://apim.docs.wso2.com/en/3.2.0/learn/api-controller/importing-apis-via-dev-first-approach/
Thank you for sharing such a useful article. It will be useful to those who are looking for knowledge. Continue to share your knowledge with others through posts like these, and keep posting on
ReplyDeleteBig Data Solutions
Advanced Data Analytics Services
Data Modernization Solutions
AI & ML Service Provider
I read your blog. It's very nice and very helpful. I learn something new every time from this website. Thanks for sharing this information with us.You can visit our services here
ReplyDeleteProduct Engineering Services Company
App Modernization Services
Enterprise App Development Services
Mobile App Development Services
Low Code Development Services
Mendix Development Services
Cloud Migration Services
Digital Assurance Services
Software testing services
Thank you for your concise yet invaluable guide on WSO2 API Manager APICTL commands. Your clear explanations and comprehensive coverage streamline the utilization of this powerful tool. By simplifying complex operations, you empower users to navigate WSO2 API Manager with confidence and efficiency. This resourceful contribution enhances our ability to manage APIs effectively, fostering innovation and agility in our endeavors. We appreciate your commitment to facilitating seamless integration and management processes within the API ecosystem.
ReplyDelete