kong v0.0.1 Kong.API

Provides access to the Kong endpoints for API management.

Consult the Kong Admin API documentation for more information about the API object properties

Summary

Functions

Adds a new API to Kong with the given map attributes

List APIs from Kong based on the given opts Keyword List

Remove API from Kong with the given string name_or_id

Retrieve an API from Kong with the given name_or_id string

Update API in Kong with the given string name_or_id with the given map attributes

Update Or Create API in Kong with the given map attributes

Functions

add(attributes)

Adds a new API to Kong with the given map attributes.

Returns either {:ok, result} where result is a map with the newly created API or {:error, reasons} where reasons is a map containing information.

add_plugin(name_or_id, attributes)

Add Plugin to API

list(opts \\ [])

List APIs from Kong based on the given opts Keyword List.

Keywords defined in opts are mapped to the Querystring parameters of the request to Kong.

Returns either {:ok, result} where result is the paginated result returned by Kong, or {:error, reasons} where reasons is a map containing information.

list_plugins(name_or_id, opts \\ [])

List Plugins per API

remove(name_or_id)

Remove API from Kong with the given string name_or_id.

Returns either {:ok, result} where result is a map with the newly created API or {:error, reasons} where reasons is a map containing information.

remove_plugin(name_or_id, plugin_name_or_id)

Remove Plugin

retrieve(name_or_id)

Retrieve an API from Kong with the given name_or_id string.

Returns either {:ok, result} where result is a map with the API or {:error, reasons} where reasons is a map containing information.

update(name_or_id, attributes)

Update API in Kong with the given string name_or_id with the given map attributes.

Returns either {:ok, result} where result is a map with the updated API or {:error, reasons} where reasons is a map containing information.

update_or_add_plugin(name_or_id, attributes)

Update or Add Plugin

update_or_create(attributes)

Update Or Create API in Kong with the given map attributes.

Returns either {:ok, result} where result is a map with the created / updated API or {:error, reasons} where reasons is a map containing information.

update_plugin(name_or_id, plugin_name_or_id, attributes)

Update Plugin