Consuming a REST Endpoint in TIBCO Business Studio
Create a REST Reference binding to consume a REST endpoint.
- Expand the Swagger file in the Service Descriptors special folder to view the endpoints, operations, parameters, and response codes.
Drag and drop an endpoint on the right side of the canvas to create a REST reference binding.
This will create a cloud shaped icon with a right facing arrow. The cloud is an indication that it is a REST reference whereas the arrow within the cloud indicates that it is a binding. Since the binding is within a cloud, it is an indication that it is a REST binding. You cannot convert a REST binding to a SOAP binding or vice versa.
Drag and drop an operation from the REST reference binding on to the canvas.
This creates an Invoke activity which is pre-configured to invoke the operation. It also creates an HTTP Client Shared Resource with the host name and port number. The configuration for these entities is copied from the Swagger document from which you created the reference binding. The reference consists of the name of the API as well as the operations it supports.
When invoking a POST or PUT method, you must provide the request string in the Input tab. To do so, click the column next to item under postRequest in XPath Expression and provide the request string in the dropdown box.
- Test the configured process using the TIBCO Business Studio debugger.