Hi, is there any way to add the
version automatically before the
Let’s say I have an API with a
listen_path identifying a project, so my
listen_path is a project ID like this
38bb66741644bb4ac74a76e8a95095c. If I add the
version the url will be:
But I want it to be:
Is there any way to do that?
By default, versioning does not support this. But you could hack a scenario where API A with listen path “/d38bb66741644bb4ac74a76e8a95095c” and no version will Url Rewrite the path to an API B with listen path “/” that has versioning enabled on it. You might have to hardcode API A’s listen path in the url rewrite
Using a custom plugin might be another option because you can achieve almost anything with it. However, let me ask a few folks internally.
I asked internally and there are several ways to achieve this. One of them is what I have suggested, however, how does the version play into the customer IDs as mentioned here in the scenario? I assume the version is or will be dynamic. Also is there a version at the backend?
If that is the case, then what I earlier suggested should work just fine. There is the caveat of latency and load balancing the calls if they are much, but it would work.
Note: Setting an empty(/) listen path would disable gateway health checks