11.1 Nodes
11.1.6 Rest Client
Functions
The Rest Client node is used to respond to RESTful requests in HUAWEI CLOUD.
Only the RESTful requests that have been authenticated by IAM Token are supported.
Parameters
Table 11-10, Table 11-11, and Table 11-12 describe the parameters of the Rest Client node.
Table 11-10 Parameters of RestAPI nodes
Parameter Mandator
y Description
Node Name Yes Name of the node. Must consist of 1 to 128 characters and contain only letters, digits, underscores (_), hyphens (-), slashes (/), less-than signs (<), and greater-than signs (>).
URL Address Yes IP address or domain name and port number of the request host. For example:
https://192.160.10.10:8080
HTTP Method Yes Type of the request. Possible values:
● GET
● POST
● PUT
● DELETE
Request Header No Click to add a request header. The parameters are described as follows:
● Parameter Name
Name of a parameter. The options are Content-Type, Accept-Language, and X-Auth-Token.
● Parameter Value
The value can contain a maximum of 64 characters and consists only of letters, digits, hyphens (-), underscores (_), slashes (/), and semicolons (;).
URL Parameter No Enters a URL parameter. The value is a character string in key=value format.
Character strings are separated by newlines.
This parameter is available only when HTTP Method is set to GET. Set these parameters as follows:
● Parameter
The value can contain a maximum of 32 characters and consists only of letters, digits, hyphens (-), and underscores (_).
● Value
The value can contain a maximum of 64 characters and consists only of letters, digits, hyphens (-), underscores (_), dollar signs ($), open braces ({), and close braces (}).
Parameter Mandator
y Description
Request Body Yes The request body is in JSON format. This parameter is available only when HTTP Method is set to POST or PUT.
Check Return Value No Checks whether the value of the returned message is the same as the expected value.
This parameter is available only when HTTP Method is set to GET. Possible values:
● YES: Check whether the return value is the same as the expected one.
● NO: No need to check whether the return value is the same as the expected one. A 200 response code is returned (indicating that the node is successfully performed).
Property Path Yes Path of the property in the JSON response message. Each Rest Client node can have only one property path. This parameter is available only when Check Returned Value is set to YES.
For example, the returned result is as follows:
{
"param1": "aaaa", "inner":
The param4 path is inner.inner.param4.
Request Success Flag Yes Enter the request success flag. If the
returned value of the response matches one of request success flags, the node is
successfully performed. This parameter is available only when Check Returned Value is set to YES.
The request success flag can contain only letters, digits, hyphens (-), underscores (_), dollar signs ($), open braces ({), and close braces (}). Separate values with semicolons (;).
Parameter Mandator
y Description
Request Failure Flag No Enter the request failure flag. If the
returned value of the response matches one of request failure flags, the node is
successfully performed. This parameter is available only when Check Returned Value is set to YES.
The request success flag can contain only letters, digits, hyphens (-), underscores (_), dollar signs ($), open braces ({), and close braces (}). Separate values with semicolons (;).
Retry Interval
(seconds) Yes If the return value of the response message does not match the request success flag, the node keeps querying the matching status at a specified interval until the return value of the response message is the same as the request success flag. By default, the timeout interval of the node is one hour. If the return value of the response message does not match the request success flag within this period, the node status changes to Failed. This parameter is available only when Check Returned Value is set to YES.
The response message body parses the transfer parameter.
No Specify the mapping between the job variable and JSON property path. Separate parameters by newline characters.
For example: var4=inner.inner.param4 var4 is a job variable. The job variable must consist of 1 to 16 characters and contain only letters and digits. inner.inner.param4 is the JSON property path.
This parameter takes effect only when it is referenced by the subsequent node. When this parameter is referenced, the format is $ {var4}
Table 11-11 Advanced parameters
Parameter Mandator
y Description
Max. Node
Execution Duration Yes Execution timeout interval for the node. If retry is configured and the execution is not complete within the timeout interval, the node will not be retried and is set to the failed state.
Retry upon Failure Yes Indicates whether to re-execute a node task if its execution fails. Possible values:
● Yes: The node task will be re-executed, and the following parameters must be configured:
– Maximum Retries – Retry Interval (seconds)
● No: The node task will not be re-executed. This is the default setting.
NOTEIf Timeout Interval is configured for the node, the node will not be executed again after the execution times out. Instead, the node is set to the failure state.
Failure Policy Yes Operation that will be performed if the node task fails to be executed. Possible values:
● End the current job execution plan
● Go to the next job
● Suspend the current job execution plan
● Suspend execution plans of the current and subsequent nodes
Table 11-12 Lineage
Parameter Description
Input
Parameter Description
Add Click Add. In the Type drop-down list, select the type to be created. The value can be DLI, DWS, OBS, or CSS.
● DWS
– Connection Name: Click . In the displayed dialog box, select a DWS data connection.
– Database: Click . In the displayed dialog box, select a DWS database.
– Schema: Click . In the displayed dialog box, select a DWS schema.
– Table Name: Click . In the displayed dialog box, select a DWS table.
● OBS
– Path: Click . In the displayed dialog box, select an OBS path.
● CSS
– Cluster Name: Click . In the displayed dialog box, select a CSS cluster.
– Index: name of the CSS index.
● DLI
– Connection Name: Click . In the displayed dialog box, select a DLI data connection.
– Database: Click . In the displayed dialog box, select a DLI database.
– Table Name: Click . In the displayed dialog box, select a DLI table.
OK Click OK to save the parameter settings.
Cancel Click Cancel to cancel the parameter settings.
Edit Click to modify the parameter settings. After the modification, save the settings.
Delete Click to delete the parameter settings.
View Details Click to view details about the table created based on the input lineage.
Output
Parameter Description
Add Click Add. In the Type drop-down list, select the type to be created. The value can be DLI, DWS, OBS, or CSS.
● DWS
– Connection Name: Click . In the displayed dialog box, select a DWS data connection.
– Database: Click . In the displayed dialog box, select a DWS database.
– Schema: Click . In the displayed dialog box, select a DWS schema.
– Table Name: Click . In the displayed dialog box, select a DWS table.
● OBS
– Path: Click . In the displayed dialog box, select an OBS path.
● CSS
– Cluster Name: Click . In the displayed dialog box, select a CSS cluster.
– Index: Enter a CSS index name.
● DLI
– Connection Name: Click . In the displayed dialog box, select a DLI data connection.
– Database: Click . In the displayed dialog box, select a DLI database.
– Table Name: Click . In the displayed dialog box, select a DLI table.
OK Click OK to save the parameter settings.
Cancel Click Cancel to cancel the parameter settings.
Edit Click to modify the parameter settings. After the modification, save the settings.
Delete Click to delete the parameter settings.
Table Details Click to view details about the table created based on the output lineage.