How to configure TIBCO API Exchange Gateway to handle various URIs with a common base path?

How to configure TIBCO API Exchange Gateway to handle various URIs with a common base path?

book

Article ID: KB0073216

calendar_today

Updated On:

Products Versions
TIBCO API Exchange ALL

Description

#Usecase
A client send requests into APIX-G, can request several URIs, with different paths, all starting with the same base-path or root node
for e.g:
/restapi/a0/a1
/restapi/b0/b11/.../b311

The requested HTTP Method(GET or POST etc) could also be different, depending on the usecase.

Environment

All Supported Platforms

Resolution

Please see attached vijay_samples.zip:
> sample configuration folder: 01942723_sample.
> sample log file: 1Facade_multiTargets.log

#FacadeOperation
- Configure the base-uri in the 'OperationURI' field
- To not restrict the HTTP-method, leave the 'Operation Method' empty.

#TargetOperation
- Unlike a Facade Operation, the HTTP-method has to be selected for a Target Operation
- So the sample is configured with one for GET and one for POST.

- 'HeadersToForward' field has the below tags:
-- {uri_suffix} will make sure any additional uri components from Facade are used in the Target call
-- {query_string} will make sure the query parameters from incoming request are used in the Target call

#Routing
- By using different routingKeys, the 1 Facade Operation can route to different Target Operations
- Using a stylesheet in 'Process Body Transform', the routingKey is set based on the incoming HTTP-method
Details about this are documented here:
https://docs.tibco.com/pub/api-exchange-gateway/2.4.0/doc/html/GUID-B7A98213-BE21-478B-B6F9-4B1C50F2B6C3.html
 

Issue/Introduction

This article provides on inputs on configuring TIBCO API Exchange Gateway(APIX-G) to handle various URIs with a common base path or root node.

Attachments

How to configure TIBCO API Exchange Gateway to handle various URIs with a common base path? get_app