cREST Standard properties
These properties are used to configure cREST running in the Standard Job framework.
The Standard cREST component belongs to the Connectivity family.
Basic settings
API Definition / Definition |
Select the way the API definition will be set.
If you have installed the R2023-05 Talend Studio Monthly update or a later one delivered by Talend, you can drag and drop a REST API Definition from the Metadata node of the Repository tree view to the design workspace to create a cREST component. |
Endpoint |
The service endpoint URL where the REST service is provided. You can either specify an explicit port number, for example, "http://localhost:8088/services/customers", or use the default port of Talend and specify the relative path only, for example, "/services/customers". The default port is different depending on the build type or where you run the service:
You can define the endpoint using context variables. For more information about Talend Studio Monthly update, check with your administrator. |
Type |
Select which type you want to use to provide the REST service. Either Manual or resourceClass. Manual: Determine the REST API mapping manually in the table if cREST is used as a service provider, or set HTTP Method and other parameters if the component is used as a service consumer. resourceClass: Select this type to provide the resource class which you want to export as the REST service. |
REST API Mapping |
This table appears when the Manual service type is selected and cREST is used as a service provider. Click [+] under the table to add as many rows as needed to specify the HTTP request: Output Flow: Specify the name of an output flow. HTTP Verb: Select a HTTP method from GET, POST, PUT, DELETE, OPTIONS, HEAD, and PATCH in the list. URI pattern: Fill this field with the REST URI that describes the resource. Consumes: Select the format type of the consume content that the component will use from XML or JSON, XML, JSON, Form, Multipart, and Any when HTTP Verb is POST, PUT, or PATCH. Produces: Select the format type of the produce content that the component will use from XML or JSON, XML, JSON, HTML, Any when HTTP Verb is GET, POST, PUT, DELETE, or PATCH. Bean class: Set the bean class when the HTTP Verb is POST, PUT, or PATCH and the consume content format is XML or JSON, XML or JSON. |
Resource Class |
This field appears when the resourceClass service type is selected. Enter the name of the resource class which you want to export as the REST service. |
Operation |
This field appears when the resourceClass service type is selected and cREST is used as the service consumer. Enter the name of the operation. |
Relative Path |
This field appears when the Manual service type is selected and cREST is used as the service consumer. Enter the relative path of the REST server to be invoked. |
HTTP Method |
This option appears when the Manual service type is selected and cREST is used as the service consumer. Select a HTTP method
from GET, POST, PUT, DELETE, PATCH,
HEAD, and OPTIONS in the
list.
Information noteWarning:
When using the POST method to create an object, by default, the created object ID will not be get back from the header. By default, the cREST filters any header except system headers. To get the created object ID, you need to set javax.ws.rs.core.Response as the response class. |
Content Type |
This option appears when the Manual service type is selected and cREST is used as the service consumer. Select XML, JSON, or FORM according to the media type of the content to be uploaded to the server end. This list appears only when you select the POST, PUT, or PATCH in the HTTP Method list. |
Accept Type |
This field appears when the Manual service type is selected and cREST is used as the service consumer. Select the media type the client end is prepared to accept for the response from the server end. Available options are XML, JSON, and ANY. When ANY is selected, the response message can be of any type and will be transformed into a string. This list does not appear when you select the DELETE method. |
Response Class |
This field appears when the Manual service type is selected and the cREST is used as the service consumer. Enter the name of the response class. |
Skip incoming data unmarshalling |
Select this check box to skip the unmarshalling of the server response data. This option is used when the server already provides the data that the Route can work on, and the need for type conversion can be avoided. |
Use Service Locator |
Select this check box to enable the Service Locator. Specify the service namespace and the service name in the corresponding fields. |
Enable the Service Activity Monitoring |
Select this check box to enable the Service Activity Monitor. Note that this option works in Runtime only. When running the Route in Talend Studio, it is recommended to clear this check box. Otherwise warnings will be thrown in the execution console. |
Security |
Select this check box to enable the security option. Select the security scheme from:
When the cREST component is used as consumer, enter a username and a password in the corresponding fields as required. To enter the password, click the [...] button next to the password field, and then in the pop-up dialog box enter the password between double quotes and click OK to save the settings. |
JWT configuration |
JWT configuration options appear when JWT Bearer Token
is selected in the Security list. In the
Keystore Type list, select:
For the Java Keystore (*.jks) or PKCS12 Keystore (*.p12, *.pfx) keystore type, you need to enter the location of the keystore file and the associated password in the Keystore File and Keystore Password field respectively. You can also set the Keystore Alias and Audience as needed. For the JSON Web Key Sets (JWKS) keystore type, you need to specify the URL of the online key sets in the JWKS URL field. You can also set the Audience as needed. |
Use Authorization |
This option is only available if you subscribed to Talend Enterprise ESB solutions. It appears when SAML Token (Runtime Only) is selected in the Security list. When the cREST component is used as the service provider, select this check box to enable authorization. When the cREST component is used as the service consumer, select this check box to invoke authorized call and specify the client's role in the Role field. |
Use Business Correlation |
Select this check box to create a correlation ID in this component. You can specify a correlation ID in the Correlation Value field. |
Advanced settings
Log messages |
Select this check box to log the message exchanges in the Route. |
Arguments | Set the optional arguments in the corresponding table. Click [+] as many times as required to add arguments to the table. Then click the corresponding Value field and enter a value. See the site http://camel.apache.org/cxfrs.html for available URI options. |
JAXRS properties | This option appears when JWT Bearer Token is selected in the Security list in the Basic settings tab. Click [+] to add as many properties as needed to the table. In the Property Name field, you can either select the property from the drop-down list, or enter a property name that is not available in the list. Enter the value of the property in the Property Value field. For more information on the JAXRS properties, see the Apache CXF documentation. |
Usage
Usage rule |
cREST can be a start component in a Route as the service provider, or middle or end component as the service consumer. |
Limitation |
Due to license incompatibility, one or more JARs required to use this component are not provided. You can install the missing JARs for this particular component by clicking the Install button on the Component tab view. You can also find out and add all missing JARs easily on the Modules tab in the Integration perspective of Talend Studio. For details, see Installing external modules. |