Skip to main content Skip to complementary content

REST properties

Availability-noteDeprecated

Properties to configure to be able to send an HTTP request to the server end and get the corresponding response information from the server end.

The underlying HTTP client used by the connector is the default HTTP client that is embedded within Java.

REST connection

Property

Configuration

Selection Select or enter REST.
Configuration
Engine Select your engine in the list.
Main Base URL Type in the URL address of the REST Web server to be invoked.
Authentication Select the way you want to authenticate to the server:
  • Select No authentication if you do not need authentication to access the server.
  • Select Basic if you need to provide a user name and password to access the server.
  • Select Digest if you need to provide a user name and password within a digest algorithm to access the server.
  • Select Bearer Token if you need to authenticate to the server using an access token.
Advanced Connection timeout (ms) Sets the maximum number of milliseconds that a user will wait for a connection to be available. If this time is exceeded and the connection is still unavailable, an exception is thrown.
Read timeout (ms) Sets the maximum waiting time in milliseconds for a connection to be considered as alive. An exception will occur if the timeout expires before there is data available to read.
Description Enter a display name (mandatory) and a description (optional) for the connection.

REST dataset

Property Configuration
Dataset name Enter a display name for the dataset. This name will be used as a unique identifier of the dataset in all Talend Cloud apps.
Connection Select your connection in the list. If you are creating a dataset based on an existing connection, this field is read-only.
Type Select the type of dataset you want to create:
  • Batch if you want to invoke a REST API service once. The pipeline that uses this dataset will be a batch pipeline.
  • Streaming if you want to invoke a REST API every N milliseconds in a streaming pipeline. The pipeline that uses this dataset will be a streaming pipeline and you will be able to define the polling interval in milliseconds in the Delay field of the source dataset.
Main Resource Enter the HTTP resource you want to consume from the REST API.
HTTP method Select the HTTP request method in the list.
Answer body format Select the body format of the message that you will receive as a response from the server end:
  • JSON: Select this format if the REST service returns a JSON message, this way the payload will be translated into properly parsed JSON records.
  • Text: Select this format if the REST service returns a message with another format like XML or if you want to retrieve unparsed JSON that you can process manually in your pipeline.
Query parameters Specify the URI query parameters in the form of name-value pairs.
Advanced Get status and headers Enable this option to request both the status and headers. By default, only the body is returned.
Maximum number of redirects Set the maximum number of redirects that the connector should follow. If you enter 0, no redirection is done. If you enter -1, the restriction gets deactivated.
Redirect only on same host Enable this option if you want redirections to be performed only when using the same host.
Force GET method for 302 redirection Enable this option to send the redirection request with the GET method if the redirection code is 302.

Local network access

By default, the Remote Engine Gen2 is configured to prevent the REST connector from accessing services inside the Remote Engine Gen2, and thus your local network URLs.

To allow access to your local network, you need to:
  • open this file to edit it:

    default/docker-compose.yml if you are using the engine in the AWS USA, AWS Europe, AWS Asia-Pacific or Azure regions.

    eap/docker-compose.yml if you are using the engine as part of the Early Adopter Program.

  • find these parameters in both the livy > environment, component-server > environment and preview-runner > environment sections of the file and change the value to true:
    CONNECTORS_ENABLE_LOCAL_NETWORK_ACCESS: "true"
    CONNECTORS_ENABLE_MULTICAST_NETWORK_ACCESS: "true"
  • save your changes and restart the Remote Engine Gen2 to take these changes into account.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!