API Connect

 View Only
  • 1.  How to use ratelimit module?

    Posted Sun July 17, 2022 02:58 AM

    Hello All,

    I read the page about ratelimit module

    but couldn't figure out how to use it or how to implement it? some part I didn't understand like the key part when creating the object? what is it and based on what I defined it


    If someone used it could help me, need it urgent to implement it in project



    ------------------------------
    Mohammad Al-Haddad
    ------------------------------


  • 2.  RE: How to use ratelimit module?

    Posted Thu July 21, 2022 04:22 AM

    Hi Mohammad,

    The key in the ratelimit module is the identifier to which that limit would apply - so you can have different limits for different identifiers and then each time you remove a token referencing that key it applies to that rate-limit you have set.

    The ratelimit module is used from within gatewayscript if you are implementing it just for DataPower or need to implement something more complex than the built-in API Connect rate limits support see https://www.ibm.com/docs/en/api-connect/10.0.5.x_lts?topic=connect-understanding-rate-limits-apis-plans (I'm assuming you are using API Connect based on the community section)

    If you could share what you are trying to achieve with this then we should be able to guide you to a solution.

    Thanks

    Ricky



    ------------------------------
    Ricky Moorhouse
    ------------------------------



  • 3.  RE: How to use ratelimit module?

    Posted Sun July 24, 2022 09:38 AM
    Hi Ricky, I used rate-limit module for a bit and saw what it give me, now I changed my plan to rate limit product plan, which is the link you gave me. i set plan, with limit 5 request per hour, published it, do request limit not recognized and the default is set.


    Product Plan
    API File

    Am I doing something wrong here?

    ------------------------------
    Mohammad Al-Haddad
    ------------------------------



  • 4.  RE: How to use ratelimit module?

    Posted Wed July 27, 2022 08:04 AM
    regarding the rate limit, i got it working to use the product plan rate limit. now changing in requirements: need rate limit working after I identifying the client id within the flow. that while calling the API I still didn't know the client I'm using until i reach client security policy in the assembly section. is it possible ?

    ------------------------------
    Mohammad Al-Haddad
    ------------------------------