@pixul/node-kong-api

1.0.2 • Public • Published

Kong Node Client

A Node Kong Api Client using Promises

Installation

 npm i -s node-kong-api

Usage

    const Kong = require('javascript-kong-api');


    let kong = new Kong({
        url: 'http://10.42.79.233:8001'
    });


    kong.listApis({}).then(data => {
        // do Something with the data
    }).catch(err => {
        // do something with the error
    });

Available methods

kong.getjavascriptInformation()
kong.getjavascriptStatus()
kong.addApi(api)
kong.getApi(nameOrId)
kong.listApis(query)
kong.updateApi(nameOrId, api)
kong.updateOrCreateApi(api)
kong.deleteApi(nameOrId)
kong.addConsumer(consumer)
kong.getConsumer(nameOrId)
kong.listConsumers(query)
kong.updateConsumer(usernameOrId, consumer)
kong.updateOrCreateConsumer(consumer)
kong.deleteConsumer(usernameOrId)
kong.addPluginToApi(apiNameOrId, plugin)
kong.addPluginToAllApis(plugin)
kong.getPlugin(id)
kong.listPlugins(query)
kong.listPluginsForApi(nameOrId, query)
kong.updatePlugin(apiNameOrId, pluginNameOrId, plugin)
kong.updateOrCreatePlugin(apiNameOrId, plugin)
kong.deletePlugin(apiNameOrId, pluginNameOrId)
kong.getEnabledPlugins()
kong.getPluginSchema(pluginName)
kong.addCertificate(certificate)
kong.getCertificate(sniOrId)
kong.listCertificates()
kong.updateCertificate(sniOrId, certificate)
kong.updateOrCreateCertificate(certificate)
kong.deleteCertificate(sniOrId)
kong.addSNI(sni)
kong.getSNI(name)
kong.listSNIs()
kong.updateSNI(name, sni)
kong.updateOrCreateSNI(sni)
kong.deleteSNI(name)
kong.addUpstream(upstream)
kong.getUpstream(nameOrId)
kong.listUpstreams(query)
kong.updateUpstream(nameOrId, upstream)
kong.updateOrCreateUpstream(upstream)
kong.deleteUpstream(nameOrId)
kong.addTarget(upstreamNameOrId, target)
kong.listTargets(upstreamNameOrId, query)
kong.listActiveTargets(upstreamNameOrId)
kong.deleteTarget(upstreamNameOrId, targetOrId)

Readme

Keywords

none

Package Sidebar

Install

npm i @pixul/node-kong-api

Weekly Downloads

0

Version

1.0.2

License

ISC

Last publish

Collaborators

  • gaetan_cany
  • damvar
  • dianelam
  • karimgasmi47
  • p-sam
  • pixulslave
  • yoannma
  • estebanl