Issue in proxy.basepath value for dynamic proxy base path

Not applicable

I am facing the below issue while trying out for dynamic proxy base path.I am not sure whether it is working as expected.Kindly confirm.

My proxy base path is dynamic as follows : /dynamicbasepath/*/test

This proxy is accepting the requests hitting the url with dynamic values in place of * .

Say for eg: /dynamicbasepath/123/test

When I check the variable reference under trace,I see proxy.basepath variable still contains * whereas proxy.url variable is fine.

proxy.basepath /dynamicbasepath/*/test
proxy.url http://rrt331ea.us-ea.4.apigee.com/dynamicbasepath/23455/test

Is this the expected behaviour of proxy.basepath?

Note:

I am able to extract the dynamic value from the variable proxy.url by giving pattern as */dynamicbasepath/{dynamicvalue}/test

Solved Solved
1 2 316
1 ACCEPTED SOLUTION

Dear @RK4,

As per the documentation here, the definition of proxy.basepath is as follows:

proxy.basepath

The value of the Base Path in your API proxy configuration.

OR

proxy.basepathThe base path as configured in the proxy XML file.

This means that proxy.basepath would have the same value (for ex: /dynamicbasepath/*/test) as you configured it in the ProxyEndpoint and it would not dynamically change as per the request made by the users.

On the other hand, the definition of proxy.url is as follows:

proxy.urlGets the complete URL associated with the proxy request received by the ProxyEndpoint, including any query parameters present.

This means that proxy.url will contain the actual/complete URL as per the request made by the user. In other words, the value of proxy.url will be set dynamically and keeps changing as per the requests.

In summary, the behaviour observed by you with regards to variables proxy.basepath and proxy.url is intended/expected behaviour.

Regards,

Amar

View solution in original post

2 REPLIES 2

Dear @RK4,

As per the documentation here, the definition of proxy.basepath is as follows:

proxy.basepath

The value of the Base Path in your API proxy configuration.

OR

proxy.basepathThe base path as configured in the proxy XML file.

This means that proxy.basepath would have the same value (for ex: /dynamicbasepath/*/test) as you configured it in the ProxyEndpoint and it would not dynamically change as per the request made by the users.

On the other hand, the definition of proxy.url is as follows:

proxy.urlGets the complete URL associated with the proxy request received by the ProxyEndpoint, including any query parameters present.

This means that proxy.url will contain the actual/complete URL as per the request made by the user. In other words, the value of proxy.url will be set dynamically and keeps changing as per the requests.

In summary, the behaviour observed by you with regards to variables proxy.basepath and proxy.url is intended/expected behaviour.

Regards,

Amar

Thankyou @AMAR DEVEGOWDA