Using the REST Web Service Command
- Updated: 2021/10/10
Using the REST Web Service Command
Create a new web service to automate data access and exchange.
Specify the URI for the REST Web
Press the F2 to insert a Credential, Local, or System variable.Users can insert a single the Local or System variable for the entire URI or multiple the Local or System variables in a single URI. For example, $vDomain$/$vAPI$/$vParam$Note: Only a single the Credential Variable can be inserted for the entire URI.
Select the Method from the drop-down menu.
Select from GET, POST, PUT, DELETE.
Specify the Request values.
URI Header: Key-Value pairs are explained below.
Header: Key-Value pairs are displayed as applicable for the selected Method. Users can customize these header key-value pair using action buttons:
- HTTPS: True, when the HTTPS connection is used.
- Server URL: Indicates the main host or the server where the web service is being tested.
- Port No: Displays the port number used for connection to the web service.
- URL Path: Displays relative URL of the specific web service.
- Add a Key-Value pair to a web service request, if the request has additional fields or parameters.
- Delete a Key-Value pair by selecting the row and clicking Delete.
Click the Send Request. This will automatically fill in
the Response and can be saved to a variable for ease of
If variables are used in the URI field:
Note: Press F2 to insert a Credential Variable to enhance security.
- When the user clicks Send Request, a message with a list of variables is inserted in the URI field along with their default values.
- Users can modify the default value or assign a value if no default value has been set. Click Get output to send the request.
Specify the Parameter values.
URL: Displays the URL Parameters for the current
web service request with Key-Value pairs.
- Add a URL or Post Parameter to a recorded request, if the request has additional fields or parameters.
- Delete a URL or Post Parameter by selecting the row and clicking Delete.
- POST Parameter: Displays the Post Parameters for the current request. Applicable when Method is POST or PUT.
Authorization: REST Web Service supports HTTP
Basic, Windows AD, and Default Network Credentials authentication types.
Based on authentication type, add the authorization parameters such as
the Domain, Username, and
Tip: When inputting authorization parameters, ensure that the service supports that authentication type.Click Send Request and the Response will be filled in automatically. The response should be stored in a variable for further processing.
- To use "logged-in" Active Directory (AD) user's credentials for authentication - leave all the fields blank. Logged-in user's AD domain will be considered for authentication purpose.
- To use a particular Active Directory user's credentials for authentication - enter Domain, Username and Password.
- To use HTTP basic authentication - leave the Domain field blank and enter Username and Password.
- URL: Displays the URL Parameters for the current web service request with Key-Value pairs.
The Response for web service supports both XML and JSON
- Header: Displays the detail keys and values of response header for the request.
- Body: Displays the response body for the selected request. This response body should be saved to an appropriate variable for testing of the GET Method.
- Save Response To: This option enables you to save the entire Response Body. Select the variable from the drop-down and save the command. The selected variable stores the Response Body during the run time.
- Save Header To (Optional): This option enables you to save the entire Response Header. Select the variable from the drop-down and save the command. The selected variable stores the Response Header during the run time.