Skip to main content
Pentaho Documentation

REST Client

Parent article

The REST client transformation step enables you to consume RESTful services. Representational State Transfer (REST) is a key design idiom that embraces a stateless client-server architecture in which web services are viewed as resources and can be identified by their URLs.

NoteThe data of the input fields can be escaped by the Calculator step and the function Mask XML content from string A or Escape HTML content.

General

Enter the following information in the transformation step name field:

  • Step name: Specifies the unique name of the REST client transformation step on the canvas. You can customize the name or leave it as the default.

Options

The REST client step features several tabs with fields. Each tab is described below.

General tab

General tab in REST             client

Use the General tab to enter the following connection information for your REST client resource:

OptionDescription
URLSpecify the path to the REST client resource. To specify the path from a field within the incoming PDI stream, select Accept URL from field.
Accept URL from fieldSelect to designate the path to the resource that is defined by a field within the incoming PDI stream. If you select this option, URL field name becomes available.
URL field nameSelect the field from the incoming PDI stream. The field should contain the path to the resource. This option is available only if you select Accept URL from field.
HTTP methodSelect how this step will interact with the resource. You can select from the following possible actions:
  • GET: To retrieve a resource.
  • POST: To create a new resource.
  • PUT: To create or update an existing resource.
  • DELETE: To delete a resource.
  • HEAD: To retrieve only the header information to a resource.
  • OPTIONS: To describe other methods and operations supported by the server.
  • PATCH: To make partial updates on a resource.
Get Method from fieldSelect to designate the GET method that is defined from a field within the incoming PDI stream. If you select this option, Method fieldname becomes available.
Method fieldnameSelect the field that defines the GET method. This option is available only if you select Get Method from field.
Body fieldSelect the field to contain the request body for POST, PUT, and DELETE methods.
Application typeSelect the application type of the resource content.
Result fieldnameSpecify the name of the resulting output field.
HTTP status code fieldnameSpecify the name of the HTTP status code field.
Response time (miiliseconds) fieldnameSpecify the name of the response time field.
Reponse header field nameSpecify the name of the response header field.

Authentication tab

Authentication tab in REST               client

If you need to authenticate with the resource, use the Authentication tab to enter the following details:

OptionDescription
HTTP LoginSpecify the username required to access the resource.
HTTP PasswordSpecify the password associated with the HTTP Login user name.
PreemptiveSelect to send the authentication credentials before a server gives an unauthorized response.
Proxy HostSpecify the name of a proxy host, if proxy authentication is required.
Proxy PortSpecify the port number of a proxy host, if proxy authentication is required.

SSL tab

SSL tab in REST client

Use the SSL tab to enter the following details for accessing a resource that requires SSL certificate authentication:

OptionDescription
Truststore fileSpecify the location of a truststore file.
Truststore passwordSpecify the location of a truststore file.

Headers tab

Headers tab in REST             client

Use the table in the Headers tab to define the content of any HTTP headers in an existing PDI field.

The headers table contains the following columns:

ColumnDescription
FieldThe field from incoming PDI stream that contains the header information
NameThe name of the outgoing PDI field from this step

Use the Get fields button to populate the table with fields from the incoming PDI stream.

Parameters tab

Parameters tab in REST             client

Use the Parameters tab to define parameter values for POST, PUT, DELETE, and PATCH requests. Parameters for the GET method should be directly a part of the URL.

The parameters table contains the following columns:

ColumnDescription
ParameterThe field from incoming PDI stream that contains the parameter information
ParameterThe name of the outgoing PDI field from this step

Use the Get button to populate the table with fields from the PDI input stream.

NoteThe parameters table and the Get button are only available when the HTTP method in the General tab is set to POST, PUT, DELETE, or PATCH.

Matrix Parameters tab

Matrix Parameters tab in REST               client

Use the Matrix Parameters tab to define matrix parameter values for POST, PUT, DELETE, and PATCH requests.

The Matrix Parameters tab contains the following columns:

ColumnDescription
ParameterThe field from the incoming PDI stream that contains the matrix parameter information
ParameterThe name of the outgoing PDI field from this step

Use the Get button to populate the table with fields from the incoming PDI stream.

NoteThe matrix parameters table and the Get button are only available when the HTTP method in the General tab is set to POST, PUT, DELETE, or PATCH.