Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

This sample demonstrates how to setup WSO2 Business Activity Monitor (BAM) to collect and summarize runtime statistics from the WSO2 API Manager and generate bills for API usage of consumers.

Prerequisites

Building and Running the Sample

Configuring BAM

1. Open $BAM_HOME/repository/conf/carbon.xml file where BAM_HOME is the BAM binary distribution folder that was downloaded as a prerequisite above. Change the carbon.xml file's port offset to 1. This is done to avoid any port conflicts of running two WSO2 Carbon instances in the same machine.

...

4. Start WSO2 BAM server by running wso2server.bat (on Windows) and wso2server.sh (on Linux).

Configuring API Manager

5. To enable API statistics collection, configure the following properties in $AM_HOME/repository/conf/api-manager.xml file.

...

8. Copy $AM_HOME/samples/Billing/billing-conf.xml file into $AM_HOME/repository/conf folder.

View Billing Information

Once the above configurations are done, log in to API Store Web application (https://<YourHostName>:9443/store). You will see the menu items required for API Monetization are now visible in the Store.

...