I’m pleased to share API Manager CLI utility which could be helpful for engineers working with the Axway API Gateway Manager. This tool is to manage and control API Manager resources without accessing through the Web UI.
Axway API Manager CLI
apimctl is a command line (CLI) utility that allows you to manage Axway’s API Manager resources. This utility allows you to automate the deployment of API Manager resources. It also allows you to view and edit the existing resources. This CLI is developed using Cobra and Viper (golang packages).
Installation
GitHub – Axway-API-Management-Plus/go-apim-cli: Axway API-Management CLI Utility
Currently, this tool is available in Linux and MacOS:
- apimctl_darwin_amd64
- apimctl_linux_amd64
release=$(curl -Ls https://github.com/Axway-API-Management-Plus/go-apim-cli/releases/latest | grep “releases/download.*linux_amd64″ | cut -d \” -f 2)
wget -q https://github.com/$release
chmod +x apimctl_linux_amd64
mv apimctl_linux_amd64 /usr/local/bin/apimctl
Supported Command
This CLI supports all the CRUD operations on the API Manager resources.
$ apimctl
apimctl controls and manages API Manager resources.
Usage :
apimctl [command]
Available Commands :
create create an API Manager resource from a file
delete delete an API Manager resource
describe describe an API Manager resource
edit edit an API Manager resource
help help about any command
list list all API Manager resource
login stores the login info of API Manager
publish publish a proxy
unpublish unpublish a proxy
Flags:
–config string config file (default is $HOME/.apimanager.yaml)
-h, –help help for apimctl
-v, –version version for apimctl
Use “apimctl [command] –help” for more information about a command.
Examples
$ apimctl login
API Manager resources
$ apimctl create org -n Marvel -ed
$ apimctl list orgs
$ apimctl desc org -n Marvel
$ apimctl edit org -n Marvel
$ apimctl delete org -n Marvel
$ apimctl create user -n ‘AntMan’ -l antman -o Marvel -r user -p antman
$ apimctl create user -n ‘Thor’ -l thor -o Marvel -r admin
$ apimctl create user -n ‘Iron Man’ -l ironman -o Marvel -r oadmin
$ apimctl create app -n Avengers -o Marvel
$ apimctl create key -a Avengers
$ apimctl create api -n ‘Captain America’ -o Marvel -f resources/swagger.json
$ apimctl create proxy -n ‘The First Avenger’ -o Marvel -b ‘Captain America’ -c resources/cert.pem -s passthrough
$ apimctl unpublish proxy -n ‘The First Avenger’
Note: For more sample commands, please view the Readme in the git repository.
Discover more about the API Gateway.
Follow us on social