Billing details submitted from the backend service to the API or BAM manager

We have several services (for working with WSO2 API Manager). We want to do billing for consumers.

Unfortunately, our billing rules need detailed information that is available only within the embedded service. I see two ways to deal with it:

  • Or, transfer the details information in the form of metadata back to the API manager, and then transfer them to the BAM, where the actual billing will be performed. I can imagine using an HTTP header or JWT for this.
  • Generate billing directly by the ESB service itself. I personally do not prefer this, as this forces the implementation of the service to be limited to code specific to WSO2.

My question is, is there a way to provide some service metadata in the response (header at the transport level) in the API manager and if it can go through the API manager in the BAM that will be tracked, analyze bills, etc ...

+5
source share
1 answer

The following blog describes how this can be done, I wrote it in a hurry. Take a look and see if this meets your requirement. I also added the necessary jar files to the blog.

https://nadeesha678.wordpress.com/2015/12/14/how-to-publish-custom-set-of-data-from-api-manager-to-wso2-business-activity-monitor/

0
source

Source: https://habr.com/ru/post/1236913/


All Articles