Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How do I transform the path between the proxy and the target?

Not applicable

Our old backend uses PHP directly so exposes URLs like this...

GET /foo/bar.php?param=mumble

We want to isolate API consumers from that sort of implementation detail (as we will probably be changing the backend in future) so we would like to have...

GET /foo/bar?param=mumble<map to> GET /foo/bar.php?param=mumble on the backend.

The documentation explicitly states that putting the following in an AssignMessage policy should acheive the desired result...

<Set>
    <Path>/a/b/c</Path>
</Set>

But no matter where I put it in the flow, Apigee seems to use the public facing path to talk to the backend. I have seen various other examples involving hacking around with target.url and target.copy.pathsuffix but I haven't found anything which works for me.

Has anybody had to do this recently?

Is the a standard pattern for this

Solved Solved
5 32 38K
1 ACCEPTED SOLUTION

You can either use AssignMessage or a simple JS script policy to change the target URL. You need to have these policies under the TargetEndPoint flow, otherwise you don't see it work.

View solution in original post

32 REPLIES 32