How is an API product selected when an API proxy is invoked?

If the same Proxy X appears in 2 different products A and B and the developer application has access to both products, which product is in context when the consumer calls the proxy endpoint? We would like to use custom attributes at the product level to drive behavior of proxy and different products will have different values for these custom attributes.

Thanks,

Steve

1 4 531
4 REPLIES 4

Apps are how developers access your API products. When a developer registers an app, they select the API products to associate with the app, and Apigee generates an API key for the app. By default, a single key provides access to all API products associated with the app. When the app makes a request, Apigee first verifies that the API key is valid and fails the request if not.

Once it validates the API Key, api product associated with it will be selected.

But in your case, not sure which product will be selected. I suggest using a "status" parameter at user level to change the behaviour based on it

Refer to documentation for API Product

Thanks for the explanation and suggestion.

Hi @skarlovic,

same Proxy X appears in 2 different products A and B and the developer application has access to both products may not be the best design for implementing this.

Bundle of APIs/API proxies are associated with an API product.

And, Bundle of associated API products are added to a developer app.

And, a developer app is associated with developer(s).

So, having a product level attribute for the same API proxy for the same developer(s) does not depict a better approach.

Share us the use-case elaborately, so that we can discuss the design.

Thanks for the response. We could use the Developer App level for the attribute(s) as well, but we were wondering which is selected for the request if there are two products for the same proxy X, and if that should be considered as an option. It sounds like this is not good practice.

Without getting into too much detail, assuming this product attribute was specific to a customer/client, and the same application was used by multiple customers, and based on this attribute (which is configurable) we want to change the target server. If instead of an attribute, I was interested in having different quotas for each product, how would I know which proxy is selected if both were bundled with the same proxy endpoint.

Thanks.