August 17, 2023

tRESTResponse – Docs for ESB 5.x



tRESTResponse properties


This component is available only to users of Talend Studio with ESB.

Component family




tRestResponse sends HTTP and/or
HTTPS responses to the client end when receiving the HTTP and/or
HTTPS requests.


To enable the HTTPS support, you have to generate a keystore
and add some HTTPS security configuration properties in the
file of your Runtime container. For more information, see the
Talend ESB Container
Administration Guide


This component allows you to return a specific HTTP status code to
the client end as a response to the HTTP request.

Basic settings Return Body Type Select a response body type from Document, String, and
Byte[] in the list.
  Return status code

Select a status code from the list to indicate the request

<<Custom>>: This option
allows you to customize the status code. Enter the status code of
your choice in the field.

Bad Request (400): The request
had bad syntax or was inherently impossible to be satisfied.

Internal Server Error (500):
The server encountered an unexpected condition which prevented it
from fulfilling the request.

OK (200): The request was

Resource Not Found (404): The
server has not found anything matching the URI given.


Schema and Edit schema

A schema is a row description, that is, it defines the number of
fields to be processed and passed on to the next component.

The schema mode is Built-in: it
is created and stored locally for this component.

Click Edit schema to make changes
to the schema.

The input flow is retrieved from the previous component connected
to tRESTResponse. Any change of the
input flow in tRESTResponse will
also be propagated to the previous component automatically.

The output flow of tRESTResponse is a hard-coded field named body, the type of which is defined in the
Return Body Type list.

Advanced settings

Response Headers

Type in the name-value pair(s) to pass additional information
about the response. For more information about response headers, see
the site


Drop JSON Response Root

Select this check box to drop the root JSON element in the


tStatCatcher Statistics

Select this check box to gather the Job processing metadata at a
Job level as well as at each component level.

Global Variables

NB_LINE: the number of rows processed. This is an After
variable and it returns an integer.

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio
User Guide.


This component covers the possibility that a Talend Job can be
wrapped as a service, with the ability to input a request to a
service into a Job and return the Job result as a service

The tRESTResponse component
should only be used with the tRESTRequest component to provide a Job result as
response for a web service provider, in case of a request-response
communication style.



Related scenario

For a scenario in which tRESTResponse is used, see
Scenario 1: REST service accepting HTTP GET requests and sending responses.

Document get from Talend
Thank you for watching.
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x