REST Backend

Not applicable

hi, there is this backend service GET http://IP:port/xyz/v1/921234567890 ( 921234567890 is an msisdn)

pfa flow.txt ive used basic authentication to encode the username and password for the backend and passed it to AssignMessage as backendAuthorization.

now what will i've to do in AssignMessage policy to send 921234567890 to the backend server since this queryparameter is /921234567890 as opposed to v1?msisdn=921234567890.

0 3 204
3 REPLIES 3

Sorry what do you mean by "this queryparameter is /921234567890" ?

Not clear how that is a query parameter. More details please.

Maybe an example, explaining how you'd like the inbound message to be shaped, and how you'd like the outbound (outbound with respect to the Apigee Edge proxy) be shaped?

FOR EXAMPLE:

INBOUND

Queryparameters inbound: X=y&a=123

headers inbound: xxx=yyy, ABC=738239

path inbound: /a/b/c

OUTBOUND

Query parameters outbound: x=938&other=a0922

headers outbound: Authorization: Something, Header2: ZZZZZ

path outbound: /foo/bar/bam

Not applicable

http://IP:Port/xyz/921234567890

apigw url --> http://IP:Port/efg/v1/xyz/921234567890

backend url --> http://IP:Port/abc/v1/921234567890

i want to replace xyz/921234567890 with /abc/v1/921234567890 (backend format)

what changes to do in AssignMessage since the uripath is being forwarded directly to backend.

pfa.
am.txt

you can accomplish what you describe very simply.

  • set the basepath to your apiproxy endpoint to be /efg . (or maybe /efg/v1 , not sure. you used both in your description)
  • set the target url to http://targetIP:Port/abc/v1/

Done.

The URL path suffix (after the basepath) is automatically appended to the target path.