Description
This operation component performs REST-based communications on hosts.
Options
Basic Options
Host name or IP address of the host performing REST-based communications.
To perform REST communication with Management Server, specify the following:
For IPv4: 'localhost' or '127.0.0.1'
For IPv6: 'localhost' or '::1'
An argument error occurs if the host name or IP address is omitted.
The maximum length of the host name or IP address is 1,024 characters. An argument error occurs if this is exceeded.
Method name of HTTP (HTTPS) to be executed.
Specify GET, POST, PUT, and DELETE. Use uppercase letters.
An argument error occurs if the method name is omitted.
The maximum length of the methodname is 1,024 characters. An argument error occurs if this is exceeded.
Path of the resource to be used.
An argument error occurs if the resource path is omitted.
The maximum length of the path is 1,024 characters. An argument error occurs if this is exceeded.
Specify the resource path as follows:
For example:
/webdav/index.html
If the HTTP (or HTTPS) method to be executed is POST, PUT, or DELETE, the arguments for the resource to be used can be specified as follows.
Use a question mark ("?") to separate the resource path from the arguments.
Specify an argument using the <argument name>=<argument value> format. To specify multiple arguments, separate each argument with an ampersand ("&") as shown below.
Example: /webdav/index.html?label1=value1&label2=value2
Specify the argument names and values for the resource to be used.
Specify this option if the HTTP (or HTTPS) method to be executed is "GET".
If the argument name and argument value are omitted, REST communication will be performed without an argument.
The maximum lengths of the argument name and the value of the argument are 1,024 characters. An argument error occurs if this is exceeded.
The specified argument name and value are converted to the UTF-8 character encoding before communications are performed.
Specify the argument name and the argument value as "Argument name = Argument value". Separate with "&" to specify more than one.
For example:
label1=value1&label2=value2
If the HTTP (or HTTPS) method to be executed is "POST" or "PUT", the specified value is stored in the body as a request.
Example: label1=value1&label2=value2
To specify requests with other formats, specify the "requestxml" option.
If the HTTP (or HTTPS) method to be executed is "DELETE", this option is ignored even if specified.
Advanced Options
Port number of the host performing REST-based communications.
Specify the port number using an integer between 0 and 65535.
If port number is omitted, 80 is specified.
Name of the user who performs BASIC authentication.
If the user name is omitted, then REST communication will be performed without BASIC authentication.
The maximum length of the user name is 1,024 characters. An argument error occurs if this is exceeded.
Password of the user who performs BASIC authentication.
If the password is omitted, then REST communication will be performed without BASIC authentication.
The maximum length of the password is 1,024 characters. An argument error occurs if this is exceeded.
Address of the element name to analyze the execution results (XML) of REST-based communications.
A text string matching the address (xpath) specified in 'element' is extracted from the text in the execution results XML file, and then output.
If there are multiple instances of elements matching the conditions, elements are enclosed in double-quotes and separated by commas for output.
For example: If the data is "element A", "element B 'C, D'": "element A", "element B ""C,D"""
An error occurs if the corresponding element doesn't exist.
Execution results of REST-based communications are output as XML if element names are omitted.
The maximum length of the element name is 1,024 characters. An argument error occurs if this is exceeded.
Specify element name addresses as follows:
For example: /response/params/item
Address of the proxy server.
Communication without a proxy server is performed if the proxy server address is omitted.
The maximum length of the address is 1,024 characters. An argument error occurs if this is exceeded.
Port number of the proxy server.
Specify the port number using an integer between 0 and 65535.
If port number is omitted, 8080 is specified.
Protocol type for performing REST communication.
Specify http or https. Use lowercase letters.
If protocol type is omitted, http is specified.
The maximum length of the protocol type is 1,024 characters. An argument error occurs if this is exceeded.
This option contains parameters for REST-based communications.
A maximum of 2,048 characters can be specified as parameters of REST communications. An argument error occurs if this limit is exceeded.
The specified parameter is converted to the UTF-8 character encoding before communications are performed.
If this option is omitted, the specification for the "param" option will take effect.
Specify the argument names and argument values for the resource to be used.
Specify the argument name and value to be passed to the resource using the <argument name>=<argument value> format shown below. To specify multiple values, specify each value separated by ampersands (&).
Example:
label1=value1&label2=value2
Specify the request to be stored in the body with REST communications.
To specify a request in the text format, specify as shown below.
Example:
UDA1=value1 UDA2=value2
To specify a request in the XML format, specify as shown below.
Example:
<request> <data>1234</data> </request>
The specification of this option is ignored.
The data format (MIME type) used in REST communication.
If the data format is omitted, application/x-www-form-urlencoded will be specified.
In addition to data formats, character sets can be specified for contenttype.
Specify data formats and character sets as follows:
Example of specifying data formats: application/xml
Example of specifying data formats and character sets: application/xml; charset=utf-8
The maximum length of the content type is 1,024 characters. An argument error occurs if this is exceeded.
The data format (MIME type) that can be received in REST communication.
If the data format is omitted, no data format will be specified. In this case, the format of the received data will follow what is specified for the communication destination.
The maximum length of the data format is 1,024 characters. An argument error occurs if this is exceeded.
Specify XML format requests as follows:
For example: text/plain
This is the completion timeout (seconds) for the execution of operation components.
Values between 300 and 86400 (1 day) can be specified.
For example: When timeout is to occur every 10 minutes: 600
When the execution of the operation components is not completed even if the specified time passes, the processing of the operation components is interrupted in return value 201.
This is the retry count for the execution of operation components.
When the operation components end in return value 161, the retry count is specified. Values between 0 and 5 can be specified.
As a result of retrying, if the operation components ended by the return values other than 161, the execution of the operation components ends even if it doesn't reach the specified retry count. The return values of the operation components become the value executed at the end.
For example: When retries are to be performed twice: 2
This is the retry interval (seconds) for operation components.
When the operation components end in return value 161, the retry interval is specified. Values between 1 and 14400 can be specified.
For example: When retrying in 300 seconds: 300
If the specification of the timeout, retry and retry_interval is omitted, and a value beyond the limits of the above-mentioned is input, the value specified with the operation components definition file becomes effective. Refer to "2.5 Definition File for Operation Components" for details.
Return Values
Icon | Name | Return value | Description |
---|---|---|---|
Success | 0 | REST communication was successful. | |
Failure | 161 | REST communication failed. Retried if a retry count has been specified. | |
176 | An element corresponding to 'element' does not exist. | ||
188 | Connection failed during execution. | ||
189 | An attempt to connect to the server has failed. | ||
197 | There is an error in the option content. | ||
- | - | 201 | Execution of operation component timed out. |
202 | The operation component was not executed. There is a problem in the setting to execute operation components. | ||
203 | Failed to execute the operation component. There is a problem in the Operation Automation Server environment. | ||
205 | The operation component was not executed. There is a problem with the input information specification of the operation components. | ||
206 | The operation component was not executed normally. There is a problem with the output information specification of the operation component. | ||
207 | The operation components were not executed. There is a possibility that the operation components are not registered in the Management Server. | ||
208 | The Automated Operation Process has been canceled because the Automated Operation Process was recovered while the operation component was executing. |
Output information
Variable | Description |
---|---|
message | This variable will be set to the following message if REST-based communications are successful. The operation component was successful. If REST-based communications fails, the content of the error will be output as a string. |
rest_communication_result | This variable is set to the execution result, using either a string or an XML format string. |
returnCode | This variable is set to the return value. |
Notes
Before using this operation component, ensure that the host where REST-based communications are to be performed is set up correctly.
When specifying the method HTTP (or HTTPS) names to be executed, specify GET, POST, PUT, or DELETE, fully capitalized.
Do not specify "&" for the parameter name or parameter value specified in the "param" option.
Confirm the return values with the Web console. Refer to "Confirming the Operation Component Execution Status/Execution Results" in the Systemwalker Runbook Automation Operation Guide for details.
When the return value of 201-208 is output, the Automated Operation Process enters an abort or error state, and the error message is output to the following places.
Event log of Management Server (when the Management Server is Windows(R))
System log of Management Server (when the Management Server is Linux)
Custom message of BPMN
Confirm the message in either of the above-mentioned place, and take an appropriate action. Refer to the Systemwalker Runbook Automation Message Guide for details.