Rest Client
Functions
The Rest Client node is used to respond to RESTful requests in Huawei Cloud.
For details about how to use the Rest Client operator, see Obtaining the Return Value of a Rest Client Node.
If some APIs of the Rest Client node cannot be called due to network restrictions, you can use a shell script to call the APIs. To call an API using a shell script, you must have an ECS that can communicate with the API. Create a host connection and run the curl command to call the API using the shell script.
Rest Client operators do not support response bodies larger than 30 MB.
Parameters
Table 1, Table 2, and Table 3 describe the parameters of the Rest Client node.
Parameter |
Mandatory |
Description |
---|---|---|
Node Name |
Yes |
Name of a node. The name must contain 1 to 128 characters, including only letters, numbers, underscores (_), hyphens (-), slashes (/), less-than signs (<), and greater-than signs (>). |
Agent Name |
Yes |
Name of a CDM cluster. The CDM cluster provides the agent connection function. If the selected CDM cluster is in the same VPC as the third-party service, the REST client can call APIs on the tenant plane.
NOTE:
You can select multiple clusters and must ensure that at least one cluster can be connected. If multiple clusters can be connected, DataArts Factory randomly connects one. |
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:
|
API Authentication Mode |
Yes |
|
Request Header |
No |
Click to add a request header. The parameters are described as follows: |
URL Parameter |
No |
Enter 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: |
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:
|
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": { "inner": { "param4": 2014247437 }, "param3": "cccc" }, "status": 200, "param2": "bbbb" } The param4 path is inner.inner.param4. You can also learn how to configure this parameter by referring to Obtaining the Return Value of a Rest Client Operator. |
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, numbers, hyphens (-), underscores (_), dollar signs ($), open braces ({), and close braces (}). Separate values with semicolons (;). |
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 failure flag can contain only letters, numbers, 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 contain 1 to 64 characters, including only letters and numbers. 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}
NOTE:
The variable name (for example, var4) must be unique in the current job. |
Parameter |
Mandatory |
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 be executed again. |
Retry upon Failure |
Yes |
Whether to re-execute a node if it fails to be executed. Possible values:
|
Policy for Handling Subsequent Nodes If the Current Node Fails |
Yes |
Operation that will be performed if the node fails to be executed. Possible values:
|
Enable Dry Run |
No |
If you select this option, the node will not be executed, and a success message will be returned. |
Task Groups |
No |
Select a task group. If you select a task group, you can control the maximum number of concurrent nodes in the task group in a fine-grained manner in scenarios where a job contains multiple nodes, a data patching task is ongoing, or a job is rerunning. |
Parameter |
Description |
---|---|
Input |
|
Add |
Click Add. In the Type drop-down list, select the type to be created. The value can be DWS, OBS, CSS, HIVE, DLI, or CUSTOM. |
OK |
Click OK to save the parameter settings. |
Cancel |
Click Cancel to cancel the parameter settings. |
Modify |
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 |
|
Add |
Click Add. In the Type drop-down list, select the type to be created. The value can be DWS, OBS, CSS, HIVE, DLI, or CUSTOM. |
OK |
Click OK to save the parameter settings. |
Cancel |
Click Cancel to cancel the parameter settings. |
Modify |
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 output lineage. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot