Layer 7 API Management

Expand all | Collapse all

Throughput quota Assertion : Fetch value of quota by day from Developer portal

  • 1.  Throughput quota Assertion : Fetch value of quota by day from Developer portal

    Posted 08-31-2018 06:07 AM

    Scenario: User has APIs created group on developer portal A, B, C. Same API can be there in multiple groups. It has different quotas by day A). 20 per day B). 30per day C). 40 per day. I want to check quota dynamically in gateway. Using throughput quota , i want to validate this quota . Instead of hardcoding the throughput quota value , i want to fetch it dynamically from developer portal. Kindly let me know the context variable which will fetch value of quota by day and counter id for that request from developer portal on gateway.



  • 2.  Re: Throughput quota Assertion : Fetch value of quota by day from Developer portal

    Posted 08-31-2018 05:33 PM

    Hello,

     

    That's an interesting use case. Unfortunately, I don't believe we have a context variable already configured to display the value of the quota by day or the current count for that request.

     

    The documentation on the Apply Throughput Quota assertion lists the context variables it generates. The documentation is here: Apply Throughput Quota Assertion - CA API Gateway - 9.3 - CA Technologies Documentation 

     

    Are you perhaps able to clarify your request another way? Maybe we can try another approach to finding what you want to ultimately achieve in the end.



  • 3.  Re: Throughput quota Assertion : Fetch value of quota by day from Developer portal

    Posted 09-02-2018 03:18 PM

    I have also tried using the quota by day fragment which was one of the developer portal assertions.

    There are ${counterValue} and the ${maxHitsPerDay} context variable used for throughput quota assertion in that fragment. However, when I included that fragment in my code , it showed me an error, saying "the context variables are not set". So I set the ${counterValue} is equals to appId which gets created when we publish the policy on developer portal using gateway, but I was not able to set ${maxHitsPerDay} value dynamically. If I get this value dynamically, my scenario will work.

     

    Any suggestions?



  • 4.  Re: Throughput quota Assertion : Fetch value of quota by day from Developer portal

    Posted 09-27-2018 10:34 AM

    Unfortunatley I'm not aware of a way to get ${maxHitsPerDay} dynamically. Some time has passed since this was last updated though, so I'm curious if you found a way around this in the meantime.