In apiProduct, how do i restrict a resource with a path param in resource path ?

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 Solved
2 1 368
1 ACCEPTED 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.

4462-create-api-products-apigee-product-documentation.png

So, You should have below resource path in your API Product,

/account/*/payment

Hope it helps. Keep us posted if any.

View solution in original post

1 REPLY 1

@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.

4462-create-api-products-apigee-product-documentation.png

So, You should have below resource path in your API Product,

/account/*/payment

Hope it helps. Keep us posted if any.