Hi!
Is there a way to extract or view the consumer's path?
For example there are multiple java services with path /basePath/java1/service1
..
/basePath/java2/service5
..
/basePath/java3/service8
..
And I have multiple API proxies
API-Proxy-1
API-Proxy-2
I need to limit who can access each of the proxy based on the caller
As API-Proxy-1 could only be accessed by /basePath/java1 and /basePath/java2 but /basePath/java3 would trigger an error
And API-Proxy-2 could only be accessed by /basePath/java2 and /basePath/java3 but /basePath/java1 would trigger an error
So exposing the source/caller's path would help in limiting the access per API proxy
@Daphne Michael -
You can extract the client's/caller's requested path with proxy.pathsuffix variable.
you can have a condition in your pre-flow as below and then do some logic if the condition matches or use it to restrict access.
<Condition>proxy.pathsuffix MatchesPath "/basePath/java3"</Condition>
Refer to this Apigee documentation for all the variables available:
https://docs.apigee.com/api-services/reference/variables-reference.
For limiting a client/caller's access to a particular APIs or sub-resources within can be achieved by creating API Product specifics to your client's.
Refer to this Apigee documentation for API Product creation:
https://docs.apigee.com/developer-services/content/what-api-product
Hi @Mudit Kumar
Thank you but I need the caller's path, not the API being called.
When java is calling the API, I want to view the java path. Is there a way to expose the source?