How to extract the path parameter at API Gateway and route request accordingly?

I have a set of native apis.

Native server configured is
http://${esb-is-5000}/ticketsBookingMgmt/bookingDetMgmt/v1

I have below resources available at esb-is-5000 IS
GET /booking
GET /booking/{booking}

I have configured the conditional routing at API GW

with below rule for GET /booking

I want to add a rule for GET /booking/{booking}.
How can i achieve the same?

Is it not possible to create conditional variable like below
${request.path} matches /booking/*

Please suggest.

Hi Farhan,
You can use “Contains” instead of “Equals”. If your use case is to route the incoming request to backend as is then you can use ${sys:resource_path} in the routing rule. This will help in one to one mapping of incoming request and native API.

You can also check the attached link for more details on variables supported. Reverb

Regards.

@Prabaa For the resource defined by GET /booking/{bookingId}, how can i get the PATH parameter(bookingId) value in a webMethods flow service which is invoked in the request processing phase? Any suggestions.
I see that the RequestSpec doesnt have any variables for this as part of the request cycle.

Hi Farhan,
The pub.apigateway.invokeISService.specifications:RequestSpec has path variable which will have /resource/{id}.

Hope this helps.

Regards.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.