I have an apiProduct=Alphabet with following API Proxies-
Api Proxy | BasePath | Resource Path / Condition | Resource Path used in apiProduct | Status | Response |
Customer | /customer/v1 | /account/{accountid}/payment | /account/*/payment/** | Not Working | Invalid ApiKey or app details |
Order | /order/v1 | /{orderid} | /** | Working | 200 OK |
According to the Apigee docs, above is the correct method of restricting resources. But in reality, its not working.
Apigee Docs - ApiProduct configuration
Question: What would be the correct method of restricting sub resources with path or query param in between ?
Solved! Go to Solution.
@Mudit , Ideally, For your requirement, Resource path in API Product should be,
/account/*/payment
Above should work, It might take few minutes to sync above pattern to message processors if you edit the API Product.
As you can see the pattern explained here, /** won't work for empty resource path or "/" as resource path. Same logic applies for /account/*/payment/** , /account/121/payment will not be allowed.
So, You should have below resource path in your API Product,
/account/*/payment
Hope it helps. Keep us posted if any.
@Mudit , Ideally, For your requirement, Resource path in API Product should be,
/account/*/payment
Above should work, It might take few minutes to sync above pattern to message processors if you edit the API Product.
As you can see the pattern explained here, /** won't work for empty resource path or "/" as resource path. Same logic applies for /account/*/payment/** , /account/121/payment will not be allowed.
So, You should have below resource path in your API Product,
/account/*/payment
Hope it helps. Keep us posted if any.