It would help if you can provide what you want to accomplish once the gateway resolves the URI so we can help craft out some suggestions. Some initial thoughts would be to either do some logic in a global policy that analyzes the various sections and pushes them through to different services using the Resolve Service assertion or consume them through to a /v1/* service that would go down different paths of logic.
Any type of variance of how the request is handled like are 95% of the requests no matter the combination handled a certain way and the 5% are outliers with different logic? We have mapping assertions that can control things like routes or such or it can be parsed from cluster wide properties at run time/possible cached.
Sincerely,
Stephen Hughes
Director, CA Support