Mapping path variable to a proxy

I have target end points in below format -


https://abc.efgh/api/{id}

https://abc.efgh/api/{id}/dept1

https://abc.efgh/api/{id}/dept2

https://abc.efgh/api/{id}/dept3

Do I need to create one proxy for all the endpoints or one proxy per endpoint !?

Most importantly, how do you recommend I map the path variable {id} in the proxy. Edge application does not support path variable in the base path while creating a reverse proxy !

Support is much appreciated.

Thank you

Nikhil C R

0 2 216
2 REPLIES 2

kkleva
Participant V

Historically, only way to do this is with a JavaScript Policy. I'm interested to know if there is a better way.

targetUrl = https://abc.efgh/api/12344/dept1

context.setVariable("target.url", targetUrl);

Being in the verge of the ocean,plex vidmate tutuapp for me.