API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#API Connect
#Applicationintegration
#APIConnect
 View Only
  • 1.  Sending notification when rate limit exceeded

    Posted Wed November 22, 2023 04:21 AM

    Hi,

    Now we are proposing APIC 10.0.5 to customer. Customer has one requirement about notification. When rate limit exceed the threshold user set, then specified users expected to receive notification. Does APIC provide such function out of box or customization is required? If customization required, how to do this customization? Thank you. 



    ------------------------------
    Guo Jun Qiao
    ------------------------------


  • 2.  RE: Sending notification when rate limit exceeded

    Posted Thu November 23, 2023 01:21 AM

    Hiya

    Thats not possible today but it is being looked at for adding to a forthcoming release.

    Because of that I wouldn't waste resources trying to build a custom solution just let us do it.

    Do you have detailed requirements on when and how you'd like the consumers notified? Should the consumer be able to opt out? Would the notification just be when they exceed their rate limit or at some kind of earlier threshold as a warning too?

    Cheers

    Chris



    ------------------------------
    Chris Dudley
    ------------------------------



  • 3.  RE: Sending notification when rate limit exceeded

    Posted Thu November 23, 2023 02:02 AM

    Hi Chris,

    Thank you very much for your reply.

    Thats not possible today but it is being looked at for adding to a forthcoming release.

    [Guo Jun] Do you know roughly when it will be added? 

    Because of that I wouldn't waste resources trying to build a custom solution just let us do it.

    [Guo Jun] If I want to customize it, what is easier way to customize it?

    Do you have detailed requirements on when and how you'd like the consumers notified? Should the consumer be able to opt out? Would the notification just be when they exceed their rate limit or at some kind of earlier threshold as a warning too?

    [Guo Jun] For example Provider Organization admin set 1 million call for consumer organization. When the call reach to 1 million, then one email will be sending to Provider Organization admin to mention that this consumer organization has reached rate limit. 

    What do you mean that should the consumer be able opt out?

    The notification would just be when they exceed their rate limit.  

    Best regards,

    Guo Jun



    ------------------------------
    Guo Jun Qiao
    ------------------------------



  • 4.  RE: Sending notification when rate limit exceeded

    Posted Thu November 23, 2023 03:56 AM

    Hiya,

    No I'm afraid I can't offer timeframes.

    I had assumed you wanted to notify the consumer when they were approaching or exceeding the rate limit, but you're looking at notifying the provider instead. Thats an interesting change, not sure we're been asked for that before, I would recommend raising an RFE so that the requirement is registered.

    The reason I mentioned opt out is because if you are notifying external consumers there are often legal regulations in some territories about consumers being able to stop companies sending them emails, but if you're notifying the provider theyd be an internal employee and the same requirement wouldnt exist.

    Worth pointing out that rate limits apply per subscription - they are defined in the product document. They are not per consumer organization, it is per subscription for one application to a single product.

    In the meantime if you did want to do something custom you can get the raw data you need out of APIC Analytics via the REST API but will then need to do whatever you need in terms of notifying etc yourself. There is not currently any kind of alerting mechanism so you would need to just poll the API on some kind of schedule - I would advise not too frequent or you will affect system performance. The data would just be the raw analytics events - there isnt an API that would return rate limit percentages per application or anything like that, but there is rate limit information in each api event. You would need to investigate how you can use that data to do what you need. I am not aware of anyone having done anything similar before.

    Please do raise the RFE.

    Cheers,

    Chris



    ------------------------------
    Chris Dudley
    ------------------------------



  • 5.  RE: Sending notification when rate limit exceeded

    Posted Sun December 22, 2024 07:22 AM

    Hi dears,

    I'm using APIC v 10 , I used plan in the products to set the rate limit and apply hard limit, and it gives 429 as a status code. Now I want to set a custom response instead of 429 using gateway script , I tried in catch exception type : AssemblyRateLimitError but it's not catched , is there any idea how could I handle this ??



    ------------------------------
    Basma Hesham
    ------------------------------