kong-api-client
v2.1.4
Published
Binding to consume kond admin interface
Downloads
7
Maintainers
Readme
kong-api-client
Desciption
This is a sdk, to the Kong Gateway Admin API https://konghq.com/solutions/gateway/. The implemented endpois are:
- Services
- Custumers
- Plugins
- Routes
The version of the kong api, is 1.1.x decribed on https://docs.konghq.com/1.1.x/getting-started/introduction
Is possible to find examples on the examples folder, and the complete reference guide to this lib on the documentation folder.
How connect to the kong instance
let KongApi = require('../../index.js')
let config = {
admin_url: 'http://' + process.env.KONG_IP + ':8001'
}
let kong = new KongApi(config)
kong.init()
How save new service
let KongApi = require('../../index.js')
let config = {
admin_url: 'http://' + process.env.KONG_IP + ':8001'
}
let kong = new KongApi(config)
kong.init()
How update new service
let KongApi = require('../../index.js')
let config = {
admin_url: 'http://' + process.env.KONG_IP + ':8001'
}
let kong = new KongApi(config)
kong.init()
Save a new custumer
let KongApi = require('../../index.js')
let config = {
admin_url: 'http://' + process.env.KONG_IP + ':8001'
}
let kong = new KongApi(config)
kong.init()
Complete documentation
Init Api
contructor Services Api domains Route Api routes Consumers Api consumers Plugin Api plugins
Need fix
- Better error msg in case of offline kong server
- User jest expect thorw on the tests
Road Map
- add unit tests
- add a dockerfile to up kong
- add the plugins on the consumers (auth)
- create the documantation
- add the custom exception
- add routes capabilite to add itens (plugins, consumers)