Kong
The Kong Metering Plugin facilitates the capture of API transaction data flowing through Kong gateways for metering, monetization and chargeback.
Building and Installation
To build and install this plugin please obtain the Revenium Metering Plugin. Uncompress the package and run the following commands:
RELEASE_VERSION corresponds to the version of the Kong Metering Plugin Package (ie, 1.10.1)
Enabling the Revenium Metering Plugin
Configuration
The Revenium Kong Plugin accepts the following configuration parameters
Parameter | Required | Description |
---|---|---|
source_id | yes | The Revenium ID of the source being metered (found under 'assets' or 'sources' in the Revenium application) |
platform_url | no | The URL of the Revenium Platform API (almost always https://api.revenium.io) |
platform_api_key | yes | The Revenium API integration key (found in your Revenium account) |
subscription_credential_header | no | The header to identify the subscription (default is "clientId") |
metadata_request_header | no | Optional HTTP request header to insert additional billing metadata |
metadata_response_header | no | Optional HTTP response header to insert additional billing metadata |
active_mode | no | If set to "true" API requests will be blocked by the plugin if the consumer is invalid, unfunded, etc. |
subscription_cache_timeout | no | When using activeMode the length of time to cache valid consumers. |
The Revenium Asset ID can be obtained from the Manage -> Sources pane in the Revenium UI
You can enable the Revenium Metering Plugin on a Kong Proxy by running a curl command similar to the one below:
Alternatively the Revenium Metering Plugin can be configured via YAML configuration:
Last updated