I have the following set of endpoints:
/users/specific-information
/users/shared-links
/users/{id} /users/{id}/information /users/{id}/plans /users/{id}/todos/{id}/details
I created Product and I would like to restrict access to some endpoints.
I would like to get access only for set of endpoints:
/users/specific-information
/users/{id} /users/{id}/information
So, according to this post Making sense of API Product configuration and this one Configuring the behavior of a Resource Path, I tried to create the next restrictions:
Paths | Resource Path |
/users/specific-information | |
/users/* | |
/users/*/information | |
API Proxies | API Proxy |
ProxyDemo |
But the restriction /users/* covers /users/specific-information, /users/plans, /users/todos, /users/shared-links as well.
Question is: Is the way to replace asterisk in the following restriction on {id}?
/users/{id} /users/{id}/information
It should look like:
Paths | Resource Path |
/users/specific-information | |
/users/{id} | |
/users/{id}/information | |
API Proxies | API Proxy |
ProxyDemo |
or kind of that?
Nope, not as far as I know.
You may want to consider rethinking your URL design, though. Independently of this issue around API Product segmentation, it's weird to me, to allow "specific-information" in the place where an ID should appear.
maybe you want /user-specific-information and /users/{id} .
That would disambiguate.