GET

The Get method can be used to fetch the details from a URL. This method
can only be used to get/extract the details from the URL without making any
changes to it.

Use Case

The following use cases helps you to understand how the GET method from the REST activity
is utilized to extract the details from the given URL.  The URL passed here will be used to
get the list of employees against it. Using this method, we will be able to extract
the details of the employees from the URL below. The output will be returned as the list
of employees available in the API.

Steps to execute a bot

1.       Drag and drop the REST activity to the workflow.

2.       Once the REST wizard opens, enter the URL from which we must get the details. Here it
is http://dummy.restapiexample.com/api/v1/employees

3.       Choose the method as GET ( Based on the requirement)

4.       Enter the credentials (If any) or choose NONE.

5.       Click on Invoke to get the details from the website in the response box.

6.       To export the details to the workflow, click on save.

7.       Now declare a variable in the text box of the output segment in which the extracted
employee details will be stored. Here it is “GT”.

8.       Now drag and drop a writelog activity to the workflow.

9.       Enter the input string as “GT” and log level as “info”.

10.   Execute the activity.

The bot executes the activity, gets the details of the employees from the given URL,
and shows the employee details in the output box.