Hello Apigee Community!
I have 4 backend API endpoints:
Preferably, I would like to configure 3 proxy endpoints in Apigee:
Unfortunately, /a/foo* and /a/bar belong to completely different API proxies so I cannot put them in a single one.
In ticket https://community.apigee.com/questions/7404/can-wildcards-be-used-in-basepaths.html Dallen points that "the wildcard must be a full path element for the classification engine to work as expected".
Do I understand it correctly that I cannot combine words with wildcards in a single base path element (to get sth like /foo.*/)?
The most obvious workaround is to go with 4 proxy endpoints (for /foo, /foo.json, /foo.xml and /bar). However, if I would like in the future to add a new type in my backend, let's say binary, I would have to add another proxy endpoint (/foo.bin). Am I correct?
Thank you,
Andrzej
Solved! Go to Solution.
Very Interesting Question,
I have created two API Proxies with different base paths & different Target Endpoints.
It works & classification happens as expected. @arghya das would you like to throw some light how exactly it happens even though request /a/bar also matches /a/* it hits /a/bar proxy instead /a/* ?
You can have two API Proxies one with basepath /a/* & other with basepath /a/bar. Please find sample proxies that worked for me.
Similarly , you can also have 3 proxy endpoints,
/a/foo , -- Points to Target -- /a/foo -- will be used for /a/foo
/a/* , -- Points to Target -- /a -- will be used for /a/foo.json, /a/foo.xml, /a/foo.bin
/a/bar, -- Points to Target -- /a/bar
@AndrzejDev my tests turned out quite well. I tried with 3 proxies: /apigee/v1, /apigee/* and /apigee/v2. I could hit each of them uniquely as long as the path was deterministic. When I undeployed /apigee/v1 I could see the /apigee/* proxy getting hit. Apart from that most of it worked fine. I made sure the sequence in which you deploy them doesn't matter as long as the wildcard is deterministic. So you might be good with this.
Do you also have a scenario where you want to use /apigee/*/test/*. I am not sure how that would work.