问题
I tried to POC WSO2 APIM integration with billing engine according the article 1, at the Configure the billing engine step 5 Define the billing plan, i can't find related URL. I tried my local deployment, it seems all URLs needs user login.
So my questions are:
- Is the "sample billing engine" used by API subscriber?
- Why needs user to define usage plan again in "sample billing engine"? The usage plan tiers should be defined by API publisher in APIM.
- Any config sample that used in real world? How to sync the Subscriber selected usage plan to "billing engine" automatically?
回答1:
Please find my answers here,
No. Api developer is the user who get paid and api subscriber is who billed. So billing engine is used by API developer.
APIM use throttling tiers to manage the API request coming to the API Gateway. But in a billing engine billing plan is diffrent from the API tiers used in APIM. In the billing engine we used billing plan to define the rules for billing. And in throttling tier we define the rules for API throttling. So define a billing plan based on the throttling tiers and mapping, need to be define manually in the billing system. In the Actual billing system you can have more complex billing rules than this.
In Actual case, there can be multiple throttling tiers subscribers may selected. That's why there is no such a option in this examples. If you want to sync them automatically you may need to write extra function to the billing engine. You can find the subscribe throttling tiers using APIM store[1] REST APIs
[1] https://docs.wso2.com/display/AM1100/Store+APIs
Thanks.
来源:https://stackoverflow.com/questions/38909535/article-enabling-monetization-of-apis-with-wso2-api-manager-related-question