API Connect

 View Only
Expand all | Collapse all

Multiple products to the same API

  • 1.  Multiple products to the same API

    Posted Tue September 20, 2022 10:09 AM
    Hi all, 


    I've come across a "problem" of concept and what will be the best way to solve the problem.
    I've got the same api (API 1) inside multiple products (Product 1 and Product 2). Products that are subscribed in the same Application (using the same credentials).
    These products have plans (let's say 10 requests per hour).

    When the application is calling the API (API 1) which plan / product is updated in the call with the request?

    What are the strategies so solve this kind of issue? What is the best?


    Cheers

    ------------------------------
    Nuno Ferreira
    ------------------------------


  • 2.  RE: Multiple products to the same API

    Posted Wed September 21, 2022 02:43 AM
    If the same application is subscribed to two products both including the same api then calls to that api are non-deterministic as to which product the call will be attributed to.
    it could be either of them as there is no way for the gateway to determine what you want to happen in this scenario so it will essentially pick one at random.


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



  • 3.  RE: Multiple products to the same API

    Posted Wed September 21, 2022 06:10 AM
    Hi Chris, 

    Thanks for your comments.
    But then how can the gateway count the number of calls that was subscribed in that product (through the plan).
    I think this notion of what product was called is a need to have thing because the client subscribed a plan where the request should be counted.

    Cheers

    ------------------------------
    Nuno Ferreira
    ------------------------------



  • 4.  RE: Multiple products to the same API

    Posted Wed September 21, 2022 07:16 AM
    Each API call is only attributed to a single product even if the API is actually in multiple and the user is subscribed to them all. That is just how it works.

    You can avoid the problem by not having the same API in multiple products that will be used by the same consumers.


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



  • 5.  RE: Multiple products to the same API

    Posted Wed September 21, 2022 08:00 AM
    Yes, each API call is attributed to a single product but what happens if your plan has being exhausted because you always get (by change) the same product? Then your client get an error even it's only made a couple of calls, witch is very strange to explain to customers.

    About the avoid of having API to multiple products that's also an option but could have business limitations if i've got a product with one single API and have another product that has multiple APIs witch one of them is the API that already exists in another product.

    For me if this is not possible in IBM API Connect this is huge implementation and also a business failure

    Cheers

    PS: thanks for the discussion Chris, i'm not against anyone ;)

    ------------------------------
    Nuno Ferreira
    ------------------------------



  • 6.  RE: Multiple products to the same API

    Posted Thu October 13, 2022 02:11 AM
    Hi Ferreira,

    As per your point of view, if we make product name also take into consideration in the API URL your issue was resolved.

    But there is no chance to add it and can't maintain the product named URL transactions count as per the API Connect Design.

    ------------------------------
    kandula nagababu
    ------------------------------



  • 7.  RE: Multiple products to the same API

    Posted Thu October 13, 2022 09:52 AM
    Yes this is a possibility but a bit disruptive in terms of clear understanding what are you calling (API) and an URL must be "readable" IMHO.
    Other possibility and this is the direction we will go is to identify the product subscription in an Header in the request and this request return an error when we can't identify the product where the API belongs (more than one).
    In this case instead of picking one (seems that this is the approach from IBM Connect), we return an error asking the client to identify through an Header what is the identification of the product.

    This way we handle 90% of the requests without change in the structure and the other 10% of calls need to have this extra identification.


    Cheers

    ------------------------------
    Nuno Ferreira
    ------------------------------



  • 8.  RE: Multiple products to the same API

    Posted Wed October 26, 2022 04:43 AM
    Hi Nuno Ferreira,

    I am not understand IBM connect approach, can you explain little more.

    my suggestion: Maintain the Products for each Client separately along with xlsheet for Client accessing products, then easily can check the what are the API's have in it and what are products that client can access, before giving another API we need to check other product have that API or not.

    ------------------------------
    kandula nagababu
    ------------------------------



  • 9.  RE: Multiple products to the same API

    Posted Wed October 26, 2022 05:03 AM
    Hi kandula nagababu, 

    I do not understand where your suggestion solve the problem of having one api associated with multiple products and with that knowing witch product are being called.


    Cheers.


    ------------------------------
    Nuno Ferreira
    ------------------------------



  • 10.  RE: Multiple products to the same API

    Posted Wed November 02, 2022 02:34 AM
    Edited by kandula nagababu Wed November 02, 2022 02:35 AM
    Hi Nuno Ferreira,

    If you share the one API for one Consumer that is only solution, In APIC rate-limit can be calculated based on the product plan and subscribed application basis. 

    If product 1 having not required API's also then you have to create one product for based on the consumer prospective, this doesn't mean to share same API in multiple products.

    ------------------------------
    kandula nagababu
    ------------------------------



  • 11.  RE: Multiple products to the same API

    Posted Mon September 26, 2022 05:42 AM
    Service level APIs will more efficient in this case like Google cloud is doing currently, FYI just an suggestion.

    ------------------------------
    Shivam Singh
    ------------------------------



  • 12.  RE: Multiple products to the same API

    Posted Mon September 26, 2022 12:01 PM
    Hi Shivam, 

    I'm sorry but i didn't understand your comment.


    Cheers.

    ------------------------------
    Nuno Ferreira
    ------------------------------