5
votes

We have some services (to be exposed with WSO2 API Manager). We want to do a billing for the consumers.

Unfortunately our billing rules need some detailed information that are available only inside the implemented service. I can see 2 ways how to handle it:

  • Either pass the details information as kind of metadata back to the API manager and then pass it to the BAM, where the actual billing will be done. I can imagine some HTTP header or JWT to be used for that
  • Generate the billing directly by the service itself to ESB. I personlly don't prefer this, as this enforces the service implementation to be bounded with WSO2-specific code.

My question is if there is a way how to provide some additional service meta-data in the response (header in transport layer) to the API manager and if it can pass through API manager to BAM to be monitored, billed analyzes etc...

1
what is the APIM version that you are using? Did you tried blog.lakmali.com/2013/10/…Thusitha Thilina Dayaratne
We are at the project start so we are trying the latest WSO2 products version.Jakub
The blog you referred to is about how to add headers to Swagger UI. For now I'm not asking for the Swagger UI for testing service. I'm looking how to pass the headers to BAM (or DAS) to be monitored, analyzed, billed.Jakub

1 Answers

0
votes

The following blog describes on how this can be done, I wrote it in a hurry. Have a look and see whether it would fit your requirement. I have also attached the required jar files in the blog.

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