WSO2 API manager: how to replace a specific part of the request URL

42 Views Asked by At

I'm new to WSO2 API Manager and I need to expose a series of APIs that we could simplify to:

  • GET mywso2:8243/example/v1/tag/test
  • POST mywso2:8243/example/v1/tag/anothertest

Every call to these EPs must be redirected to:

  • GET myserver:8080/process/tag/v1/test
  • POST myserver:8080/process/tag/v1/anothertest

How can I achieve such a result? I tried checking the documentation but couldn't find a solution where the path is partially changed as I would need.

1

There are 1 best solutions below

0
ycr On

Create your API like below. Then you can invoke it as https://localhost:8243/example/v1/test1 which will call http://myserver:8080/process/tag/v1/test1

enter image description here

If you need to change the backend version dynamically you may have to add a custom mediation policy to your API.