Allow access to main path but disallow to sub path

Not applicable

I have a proxy with these endpoints:

GET /v1/prices

A request example: /v1/prices?branch=1

POST /v1/prices/cost

In the body of this request I send a JSON object

What I am trying to do is create a product that will allow access only to the GET /v1/prices and disallow the access to POST /v1/prices/cost


Is it possible to create this rule with the Product's Resource?

Solved Solved
2 5 734
1 ACCEPTED SOLUTION

yes, in Apigee Edge, you can associate to each API Product a set of configured resource paths. If you don't bother to associate any paths, then all paths are allowed.

So you could specify /v1/prices as the supported path in Product1,

and /** as the supported path in Product2.

Here's a 5-minute walk-through. (click the video below to play it, or right click here to open in full-screen.)

It is not possible, in today's API Product, to restrict based on Verb + Path combination.

View solution in original post

5 REPLIES 5

Are you using the micro-gateway? There's a tag that says you are. But I didn't see anything in the question that made it explicit.

How do I check that? What I can say is that it is a proxy 🙂

yes, in Apigee Edge, you can associate to each API Product a set of configured resource paths. If you don't bother to associate any paths, then all paths are allowed.

So you could specify /v1/prices as the supported path in Product1,

and /** as the supported path in Product2.

Here's a 5-minute walk-through. (click the video below to play it, or right click here to open in full-screen.)

It is not possible, in today's API Product, to restrict based on Verb + Path combination.

Thank you so much! Amazing explanation and awesome video, thank you for your time 😃

Ya mon. We aim to please!