Adding a REST Transform Operator
Takes an input data frame, executes a REST call, and interprets the result which gets passed upstream.
- On the Application page, click
and select Rest_Transform
in the Add Operator pane.
The REST Transform node
icon displays in the Graph pane, as well as the properties to be defined in the Operator Settings pane, and the preview of the data in the Schema pane.
The right (outbound) edge allows you to connect to the other operators.
- In the Operator Settings pane, define or select the following required properties:
Property Description Node ID
The ID of the REST Transform operator.
Inputs
The stream of records or input you will be subscribed to.
Interval
The interval of which the data should be published to the output stream (in milliseconds).
Keep Records
Check to retain or not remove flushed elements. This means the entire set of records will be flushed at each interval.
Authentication Type
-
Basic
Enter the URL of the REST API. Then enter the User Id and the Password that will be used to the connect to the REST API.
-
OAuth
Then enter the following settings:
-
Token URL – The URL to retrieve the access token from.
-
Token Request Body – The request body used for access token requests.
-
Add Access Token To - The Access token retrieved from the Token URL can be added to headers, URL or request body, depending on how the REST endpoint needs the token.
-
Request Header - A header is automatically added to the REST API request.
-
Request URL - The URL needs to be manually parameterised with a {access_token} parameter, before calling the REST API, the parameter is replaced with the actual token.
-
Request Body - The Request Body needs to be manually parameterised with a {access_token} parameter, before calling the REST API, the parameter is replaced with the actual token.
-
-
-
URL – The URL of the REST API.
HTTP Method
Select the appropriate HTTP method for the request from the following options:
-
GET – retrieve data
-
POST – add new data
-
PUT – replace existing data
-
DELETE – remove existing data
Timeout
The length of time to wait for the server response (10 to 300). Default is 10.
Content Type
The required Content Type. Default is application/json.
Request Body
The Request Body for HTTP POST.
You can also click
to generate the Request Body.
-
- Select the Multiple Records checkbox to send unnamed array.
- In the Response Settings section, click Generate Output Schema
to fetch the schema of the output topic. This populates the list of columns, with the data type found from inspecting the first ‘n’ rows of the file.
- Select the Response Type:
- XML
- JSON
If JSON is selected, enter the Record Path which allows the identification of multiple records within the JSON document.
- Text
If Text is selected, confirm the Column Delimiter, Text Qualifier, and if the first row of the message includes column headings.
- Select the Priority of the node’s startup:
Priority Description APPLICATION
Running and successful completion of the node is critical in the application startup.
HIGHEST
Highest priority but not critical.
HIGH (Default)
High priority but not critical.
STANDARD
Standard priority.
LOW
Low priority.
- Enter or select the following properties:
Property Description Source
The column name of the source schema.
Target
The column name of the target schema.
XPath/Json Path/Index
The column name of the target schema.
Type
The data type of the column. Can be: BOOLEAN, DATE, DATETIME, DOUBLE, FLOAT, INT, LONG, STRING, TIME.
Date Format
Date/Time format when the data type is DATE, DATETIME, or TIME.
- You can also click the following icons:
Button Description Add a new field entry.
Select the checkbox of a field entry and click
to delete.
- Save the changes.
(c) 2013-2024 Altair Engineering Inc. All Rights Reserved.