It is replaced by Web Service Integration |
Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use/
The Webservice Universal Task allows you to call a web service triggered from Universal Agent.
This Universal Task is especially useful for Stonebranch SaaS customers, which access Universal Controller in the Stonebranch AWS Cloud and deploy their Universal Agents in their own datacenter. As the Universal Task is triggered from the Universal Agent, no additional firewall port for the Universal Agent needs to be opened.
Universal Agent for Linux or Windows Version 7.0.0.0 is required.
Universal Agent needs to be installed with python option (--python yes).
Universal Controller 7.0.0.0 is required.
Call a Webservice triggered from Universal Agent.
Support all common HTTP Methods for RESTful Services: Get, Post, Put, Patch and Delete.
Support for Basic Authentication.
Support for Form based query Parameters.
Support for Form and Script based HTTP Payload Parameters.
Provide HTTP Headers as Form Data: for example, key: Accept
, Value: application/json
.
Support Response Processing using either Output Type JSON or Text.
For the HTTP payload type FORM, only the MIME Type application/json is supported.
For Output processing, the Output Type XML is currently not supported.
The SOAP messaging protocol is not support in this Version.
To use this downloadable Universal Template, you first must perform the following steps:
Select the template ZIP file and Import.
When the template has been imported successfully, the Universal Template will appear on the list. Refresh your Navigation Tree to see these tasks in the Automation Center Menu.
For this new Universal Task type, create a new task, and enter the task-specific details that were created in the Universal Template.
Webservice Universal Task provides five different HTTP Methods.
Get
Post
Put
Patch
Delete
For each HTTP Method, the specific fields are described, and an example is provided.
The GET HTTP method is used to retrieve data from the server. This is a read-only method.
Field | Description | |
protocol | [ HTTP(S)/REST | SOAP ]
| |
HTTP Authentication | [ --None-- | Basic ] If Basic HTTP Authentication is selected, the field credentials will be visible to enter Basic Authentication Credentials. | |
Credentials | Credentials for Basic Authentication The field is only visible if HTTP Authentication Method “Basic” has been selected. | |
HTTP Method | [Get | Post | Put | Patch | Delete]
| |
Timeout | REST request timeout in seconds. If a value is entered, it will overwrite the default timeout default for consuming the REST API. | |
URL | REST Service Endpoint For example, | |
URL Query Parameters | Name & Value Array Field Enter the URL Query Parameters in the Array Field. For example, Name=ID, Value=10 Query parameters are a defined set of parameters attached to the end of a URL. | |
HTTP Payload Type | [ Raw | Form Data ] If Raw is selected, the Payload needs to provided in the format set in the field MIME Type. For example, MIME Type = The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library.
| |
MIME Type | [application/javascript | Application/json | application/xml | application/x-www-form-urlencoded | test/html | test/plain | test/xml | Other] Mime Type is the same as the Content-Type header and describes the format the body of your request is being sent as. | |
Form Data | Payload Form Data | |
Payload Source | [ Form | Script ] The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library. If Payload Script is selected, the field Payload appears to enter the payload in the format selected in the Field MIME Type. | |
Payload | Payload The field is only visible if Payload Source is selected as Form. The Payload: Enter the payload in the format selected in the Field MIME Type. For example, MIME Type Payload JSON format:
| |
Payload Script | Payload Script The field is only visible if Payload Source is selected as Script. Select or create a new Script saved in the Universal Controller script library. Enter the Payload in the script in the format selected in the Field MIME Type. | |
HTTP Headers | HTTP Header array field. Enter the HTTP Header as Name & Value Pairs. For example, HTTP Header Name= | |
Response Processing | [Print HTTP Response Code to STDOUT | Print HTTP Response Header to STDOUT | Print HTTP Response Body to STDOUT | Print HTTP Response Header to File | Print HTTP Response Body to File] | |
Output Type | [ Text | XML | JSON ]
| |
Path Expression | JSON Path Expression The field is only visible if Output Type For example,
These match the Variable “title” in the following JSON:
| |
Response Output File | Full Path and file name of the Output File The field is only visible if in the Response Processing field one of the following entries has been selected: [Print HTTP Response Header to File | Print HTTP Response Body to File] The Response is written to an Output File on the File System. For example, Output File = | |
Response Exit Code Mapping | The Value that pattern match the Path Expression of the JSON output, will used in the Response Exit Code Mapping table to set the exit code of the Task. | |
Proxies | Proxy Server https=https://proxyip:port For example, https=https://192.155.10.130:8080 | |
Log level (default is Inherited) | Universal Task logging settings: [Inherited | Trace | Debug | Info | Warn | Error | Severe] |
The Value that pattern matched the Path Expression of the JSON output will be used in the Response Exit Code Mapping table to set the exit code of the Task.
For example,
Output Type = JSON
Path Expression: 0.title
These match the Variable “title” in the following JSON:
[ { "userId":1, "id":2, "title":"qui est esse", "body":"Hello world" } ] |
The Exit code of the Task is “0” because the Path Expression: 0.title
matched the entry "qui est esse
" in the Response Exit Code Mapping table.
The following example calls the Rest endpoint https://jsonplaceholder.typicode.com/users to retrieve the user record for Leanne Graham (URL Query Parameter).
The POST HTTP method is used to send data to a server to create/update a resource.
The data sent to the server with POST is stored in the request body of the HTTP request.
Field | Description | |
protocol | [ HTTP(S)/REST | SOAP ]
| |
HTTP Authentication | [ --None-- | Basic ] If Basic HTTP Authentication is selected, the field credentials will be visible to enter Basic Authentication Credentials. | |
Credentials | Credentials for Basic Authentication The field is only visible if HTTP Authentication Method “Basic” has been selected. | |
HTTP Method | [Get | Post | Put | Patch | Delete]
| |
Timeout | REST request timeout in seconds. If a value is entered, it will overwrite the default timeout default for consuming the REST API. | |
URL | REST Service Endpoint For example, | |
URL Query Parameters | Name & Value Array Field Enter the URL Query Parameters in the Array Field. For example, Name=ID, Value=10 Query parameters are a defined set of parameters attached to the end of a URL. | |
HTTP Payload Type | [ Raw | Form Data ] If Raw is selected, the Payload needs to provided in the format set in the field MIME Type. For example, MIME Type = The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library.
| |
MIME Type | [application/javascript | Application/json | application/xml | application/x-www-form-urlencoded | test/html | test/plain | test/xml | Other] Mime Type is the same as the Content-Type header and describes the format the body of your request is being sent as. | |
Form Data | Payload Form Data | |
Payload Source | [ Form | Script ] The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library. If Payload Script is selected, the field Payload appears to enter the payload in the format selected in the Field MIME Type. | |
Payload | Payload The field is only visible if Payload Source is selected as Form. The Payload: Enter the payload in the format selected in the Field MIME Type. For example, MIME Type Payload JSON format:
| |
Payload Script | Payload Script The field is only visible if Payload Source is selected as Script. Select or create a new Script saved in the Universal Controller script library. Enter the Payload in the script in the format selected in the Field MIME Type. | |
HTTP Headers | HTTP Header array field. Enter the HTTP Header as Name & Value Pairs. For example, HTTP Header Name= | |
Response Processing | [Print HTTP Response Code to STDOUT | Print HTTP Response Header to STDOUT | Print HTTP Response Body to STDOUT | Print HTTP Response Header to File | Print HTTP Response Body to File] | |
Output Type | [ Text | XML | JSON ]
| |
Path Expression | JSON Path Expression The field is only visible if Output Type For example,
These match the Variable “title” in the following JSON:
| |
Response Output File | Full Path and file name of the Output File The field is only visible if in the Response Processing field one of the following entries has been selected: [Print HTTP Response Header to File | Print HTTP Response Body to File] The Response is written to an Output File on the File System. For example, Output File = | |
Response Exit Code Mapping | The Value that pattern match the Path Expression of the JSON output, will used in the Response Exit Code Mapping table to set the exit code of the Task. | |
Proxies | Proxy Server https=https://proxyip:port For example, https=https://192.155.10.130:8080 | |
Log level (default is Inherited) | Universal Task logging settings: [Inherited | Trace | Debug | Info | Warn | Error | Severe] |
The following example calls the Rest endpoint https://jsonplaceholder.typicode.com/posts to add a new user record with userId = 8, tittle = Stonebranch and body “Hello world form”.
The HTTP Method Put is used to send data to a server to create/update a resource.
The difference between POST and PUT is that PUT requests are idempotent. That is, calling the same PUT request multiple times will always produce the same result. In contrast, calling a POST request repeatedly have side effects of creating the same resource multiple times.
A PUT request requires the entire body to be sent through.
Field | Description | |
protocol | [ HTTP(S)/REST | SOAP ]
| |
HTTP Authentication | [ --None-- | Basic ] If Basic HTTP Authentication is selected, the field credentials will be visible to enter Basic Authentication Credentials. | |
Credentials | Credentials for Basic Authentication The field is only visible if HTTP Authentication Method “Basic” has been selected. | |
HTTP Method | [Get | Post | Put | Patch | Delete]
| |
Timeout | REST request timeout in seconds. If a value is entered, it will overwrite the default timeout default for consuming the REST API. | |
URL | REST Service Endpoint For example, | |
URL Query Parameters | Name & Value Array Field Enter the URL Query Parameters in the Array Field. For example, Name=ID, Value=10 Query parameters are a defined set of parameters attached to the end of a URL. | |
HTTP Payload Type | [ Raw | Form Data ] If Raw is selected, the Payload needs to provided in the format set in the field MIME Type. For example, MIME Type = The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library.
| |
MIME Type | [application/javascript | Application/json | application/xml | application/x-www-form-urlencoded | test/html | test/plain | test/xml | Other] Mime Type is the same as the Content-Type header and describes the format the body of your request is being sent as. | |
Form Data | Payload Form Data | |
Payload Source | [ Form | Script ] The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library. If Payload Script is selected, the field Payload appears to enter the payload in the format selected in the Field MIME Type. | |
Payload | Payload The field is only visible if Payload Source is selected as Form. The Payload: Enter the payload in the format selected in the Field MIME Type. For example, MIME Type Payload JSON format:
| |
Payload Script | Payload Script The field is only visible if Payload Source is selected as Script. Select or create a new Script saved in the Universal Controller script library. Enter the Payload in the script in the format selected in the Field MIME Type. | |
HTTP Headers | HTTP Header array field. Enter the HTTP Header as Name & Value Pairs. For example, HTTP Header Name= | |
Response Processing | [Print HTTP Response Code to STDOUT | Print HTTP Response Header to STDOUT | Print HTTP Response Body to STDOUT | Print HTTP Response Header to File | Print HTTP Response Body to File] | |
Output Type | [ Text | XML | JSON ]
| |
Path Expression | JSON Path Expression The field is only visible if Output Type For example,
These match the Variable “title” in the following JSON:
| |
Response Output File | Full Path and file name of the Output File The field is only visible if in the Response Processing field one of the following entries has been selected: [Print HTTP Response Header to File | Print HTTP Response Body to File] The Response is written to an Output File on the File System. For example, Output File = | |
Response Exit Code Mapping | The Value that pattern match the Path Expression of the JSON output, will used in the Response Exit Code Mapping table to set the exit code of the Task. | |
Proxies | Proxy Server https=https://proxyip:port For example, https=https://192.155.10.130:8080 | |
Log level (default is Inherited) | Universal Task logging settings: [Inherited | Trace | Debug | Info | Warn | Error | Severe] |
The following two example call the Rest endpoint https://jsonplaceholder.typicode.com/posts/1 to update a user record. The first example uses a Forma Data payload. The second example uses a RAW Data payload.
The following example calls the Rest endpoint https://jsonplaceholder.typicode.com/posts/1 to update a user record using Form Data.
The following example calls the Rest endpoint https://jsonplaceholder.typicode.com/posts/1 to update a user record using Raw Data.
The HTTP Method Patch updates an existing resource, and does not require sending the entire body with the request.
Field | Description | |
protocol | [ HTTP(S)/REST | SOAP ]
| |
HTTP Authentication | [ --None-- | Basic ] If Basic HTTP Authentication is selected, the field credentials will be visible to enter Basic Authentication Credentials. | |
Credentials | Credentials for Basic Authentication The field is only visible if HTTP Authentication Method “Basic” has been selected. | |
HTTP Method | [Get | Post | Put | Patch | Delete]
| |
Timeout | REST request timeout in seconds. If a value is entered, it will overwrite the default timeout default for consuming the REST API. | |
URL | REST Service Endpoint For example, | |
URL Query Parameters | Name & Value Array Field Enter the URL Query Parameters in the Array Field. For example, Name=ID, Value=10 Query parameters are a defined set of parameters attached to the end of a URL. | |
HTTP Payload Type | [ Raw | Form Data ] If Raw is selected, the Payload needs to provided in the format set in the field MIME Type. For example, MIME Type = The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library.
| |
MIME Type | [application/javascript | Application/json | application/xml | application/x-www-form-urlencoded | test/html | test/plain | test/xml | Other] Mime Type is the same as the Content-Type header and describes the format the body of your request is being sent as. | |
Form Data | Payload Form Data | |
Payload Source | [ Form | Script ] The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library. If Payload Script is selected, the field Payload appears to enter the payload in the format selected in the Field MIME Type. | |
Payload | Payload The field is only visible if Payload Source is selected as Form. The Payload: Enter the payload in the format selected in the Field MIME Type. For example, MIME Type Payload JSON format:
| |
Payload Script | Payload Script The field is only visible if Payload Source is selected as Script. Select or create a new Script saved in the Universal Controller script library. Enter the Payload in the script in the format selected in the Field MIME Type. | |
HTTP Headers | HTTP Header array field. Enter the HTTP Header as Name & Value Pairs. For example, HTTP Header Name= | |
Response Processing | [Print HTTP Response Code to STDOUT | Print HTTP Response Header to STDOUT | Print HTTP Response Body to STDOUT | Print HTTP Response Header to File | Print HTTP Response Body to File] | |
Output Type | [ Text | XML | JSON ]
| |
Path Expression | JSON Path Expression The field is only visible if Output Type For example,
These match the Variable “title” in the following JSON:
| |
Response Output File | Full Path and file name of the Output File The field is only visible if in the Response Processing field one of the following entries has been selected: [Print HTTP Response Header to File | Print HTTP Response Body to File] The Response is written to an Output File on the File System. For example, Output File = | |
Response Exit Code Mapping | The Value that pattern match the Path Expression of the JSON output, will used in the Response Exit Code Mapping table to set the exit code of the Task. | |
Proxies | Proxy Server https=https://proxyip:port For example, https=https://192.155.10.130:8080 | |
Log level (default is Inherited) | Universal Task logging settings: [Inherited | Trace | Debug | Info | Warn | Error | Severe] |
The following example calls the Rest endpoint https://jsonplaceholder.typicode.com/posts/1 to update title field with the value “Title update using patch”.
The HTTP Method DELETE removes a resource.
Field | Description | |
protocol | [ HTTP(S)/REST | SOAP ]
| |
HTTP Authentication | [ --None-- | Basic ] If Basic HTTP Authentication is selected, the field credentials will be visible to enter Basic Authentication Credentials. | |
Credentials | Credentials for Basic Authentication The field is only visible if HTTP Authentication Method “Basic” has been selected. | |
HTTP Method | [Get | Post | Put | Patch | Delete]
| |
Timeout | REST request timeout in seconds. If a value is entered, it will overwrite the default timeout default for consuming the REST API. | |
URL | REST Service Endpoint For example, | |
URL Query Parameters | Name & Value Array Field Enter the URL Query Parameters in the Array Field. For example, Name=ID, Value=10 Query parameters are a defined set of parameters attached to the end of a URL. | |
HTTP Payload Type | [ Raw | Form Data ] If Raw is selected, the Payload needs to provided in the format set in the field MIME Type. For example, MIME Type = The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library.
| |
MIME Type | [application/javascript | Application/json | application/xml | application/x-www-form-urlencoded | test/html | test/plain | test/xml | Other] Mime Type is the same as the Content-Type header and describes the format the body of your request is being sent as. | |
Form Data | Payload Form Data | |
Payload Source | [ Form | Script ] The Payload can be provided as Payload Source Form or Script. The Script can be uploaded or created in the Universal Controller script library. If Payload Script is selected, the field Payload appears to enter the payload in the format selected in the Field MIME Type. | |
Payload | Payload The field is only visible if Payload Source is selected as Form. The Payload: Enter the payload in the format selected in the Field MIME Type. For example, MIME Type Payload JSON format:
| |
Payload Script | Payload Script The field is only visible if Payload Source is selected as Script. Select or create a new Script saved in the Universal Controller script library. Enter the Payload in the script in the format selected in the Field MIME Type. | |
HTTP Headers | HTTP Header array field. Enter the HTTP Header as Name & Value Pairs. For example, HTTP Header Name= | |
Response Processing | [Print HTTP Response Code to STDOUT | Print HTTP Response Header to STDOUT | Print HTTP Response Body to STDOUT | Print HTTP Response Header to File | Print HTTP Response Body to File] | |
Output Type | [ Text | XML | JSON ]
| |
Path Expression | JSON Path Expression The field is only visible if Output Type For example,
These match the Variable “title” in the following JSON:
| |
Response Output File | Full Path and file name of the Output File The field is only visible if in the Response Processing field one of the following entries has been selected: [Print HTTP Response Header to File | Print HTTP Response Body to File] The Response is written to an Output File on the File System. For example, Output File = | |
Response Exit Code Mapping | The Value that pattern match the Path Expression of the JSON output, will used in the Response Exit Code Mapping table to set the exit code of the Task. | |
Proxies | Proxy Server https=https://proxyip:port For example, https=https://192.155.10.130:8080 | |
Log level (default is Inherited) | Universal Task logging settings: [Inherited | Trace | Debug | Info | Warn | Error | Severe] |
The following example calls the Rest endpoint https://jsonplaceholder.typicode.com/posts/1 to delete the resource specified in the endpoint URL.