tRESTResponse Standard properties - Cloud - 8.0

ESB REST

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > ESB components > ESB REST components
Data Quality and Preparation > Third-party systems > ESB components > ESB REST components
Design and Development > Third-party systems > ESB components > ESB REST components
Last publication date
2024-02-20

These properties are used to configure tRESTResponse running in the Standard Job framework.

The Standard tRESTResponse component belongs to the ESB family.

This component is relevant only when used with one of the Talend solutions with ESB, as it should be used with the Service Repository node and the Data Service creation related wizard(s).

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 status.

- <<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 fulfilled.

- 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 http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.2.

Drop JSON Response Root

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

JSON Array Keys

Type in the keywords for the JSON result to be formatted as a JSON array.

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

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+Space to access the variable list and choose the variable to use from it.

For more information about variables, see Using contexts and variables.

Usage

Usage rule

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 response.

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.