kongctl
a simple kong commad line tool, to import/export api configurations from JSON file.
compatible with Kong version >= 0.13.1
setup
npm i -g kongctl
commands
import import all kong configurations from json file export export all kong configurations to a json file delete-all delete everything get-services list all services get-routes list all routes get-plugins list all plugins get-consumers list all consumers delete-services delete all consumers delete-routes delete all routes delete-plugins delete all plugins delete-consumers delete all consumers
options
-h, --host STRING kong instance host -f, --file FILE services json file path
examples
# import from json file kongctl -h http://localhost:8001 import -f config.json # export to a json file kongctl -h http://localhost:8001 export -f backup.json # delete everything kongctl -h http://localhost:8001 delete-all # get all services kongctl -h http://localhost:8001 get-services # get service with id kongctl -h http://localhost:8001 get-services <id>
for the full commands list
kongctl --help
JSON File Structure