REST Client
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.
The 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
Use the General tab to enter the following connection information for your REST client resource:
Option | Description |
---|---|
URL |
Specify 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 field |
Select 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 name |
Select 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 method |
Select how this step will interact with the resource. You can select from the following possible actions:
|
Get Method from field |
Select 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 fieldname |
Select the field that defines the GET method. This option is available only if you select Get Method from field. |
Body field |
Select the field to contain the request body for POST, PUT, and DELETE methods. |
Application type | Select the application type of the resource content. |
Result fieldname | Specify the name of the resulting output field. |
HTTP status code fieldname | Specify the name of the HTTP status code field. |
Response time (miiliseconds) fieldname | Specify the name of the response time field. |
Reponse header field name | Specify the name of the response header field. |
Authentication Tab
If you need to authenticate with the resource, use the Authentication tab to enter the following details:
Option | Description |
---|---|
HTTP Login | Specify the username required to access the resource. |
HTTP Password | Specify the password associated with the HTTP Login user name. |
Preemptive |
Select to send the authentication credentials before a server gives an unauthorized response. |
Proxy Host | Specify the name of a proxy host, if proxy authentication is required. |
Proxy Port | Specify the port number of a proxy host, if proxy authentication is required. |
SSL Tab
Use the SSL tab to enter the following details for accessing a resource that requires SSL certificate authentication:
Option | Description |
---|---|
Truststore file |
Specify the location of a truststore file. |
Truststore password |
Specify the location of a truststore file. |
Headers Tab
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:
Column | Description |
---|---|
Field | The field from incoming PDI stream that contains the header information |
Name | The 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
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:
Column | Description |
---|---|
Parameter |
The field from incoming PDI stream that contains the parameter information |
Parameter |
The name of the outgoing PDI field from this step |
Use the Get button to populate the table with fields from the PDI input stream.
The 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
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:
Column | Description |
---|---|
Parameter |
The field from incoming PDI stream that contains the matrix parameter information |
Parameter |
The name of the outgoing PDI field from this step |
Use the Get button to populate the table with fields from the incoming PDI stream.
The 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.