1

We are working on a solution built on top of WSO2 APIM.

Problem Statement:

We want to add custom capability in existing APIM. Right now if we consume a single api endpoint it gives us meaningful statics some of them are:

  • API Usage API
  • API Usage per Application
  • Top Users per Application
  • Resource Usage per Application

But what we need is to store some/all incoming request data into database and extract meaningful information over time.

Example:

Suppose we have a api endpoint like below:

HTTP-Verb: POST

URL: http://localhost:9444/subscriptions/1/create_subscription

Params: name:sample_name, type:sample_type, user_id:12345

What we want?

  • It could be WSO2, OpenAM or any other opensource API manager.
  • We need to store parameter values e.g. sample_name, sample_type and user_id in database.

Observations?

Anyone has a experience with this kind of problem please let me know.

Haris Qurashi
  • 2,104
  • 1
  • 13
  • 28
  • Do you want to intercept REST API calls coming to 8243 or Service calls coming to 9443? – Bee May 06 '19 at 05:17

2 Answers2

0

There are two problems you have to solve here, 1. Capture the required data from the APIM side 2. Publish to Analytics Server 3. Perform Analytics on received events

As you have observed WSO2 SP can be used for 3.

For 1 & 2, please see blog (https://medium.com/@naduni_pamudika/how-to-publish-custom-attributes-from-wso2-api-manager-to-wso2-analytics-38dd83e8aea2) for extending the publishers to capture and publish additional data.

Niveathika
  • 1,319
  • 2
  • 8
  • 17
-2

You can also take a look at OpenIG, it is easy to extend and you can implement your own filter to store request data in database. Another approach is develop your own gateway based on Netflix Zuul or Spring Cloud Gateway