#Part 3 Create A Rest Request
[Music] [Music] so this is part three and in this part we are going to create an action in flow designer so the action is going to basically send the rest requests to the API in order to get the historical data so let's see first which API that we are going to use and what kind of response that we are going to get so you have all the information in this URL API code in 1980 I calm and for example we have the pad which is /o so if you use the endpoint plus the pad is going to return all result but it's not a good idea to use this one most probably it's going to fail because it's a big amount of data the best thing to do is to get your list of cases per country and by case type from the first recorded case so this path so the way you have to construct your ear also you can put your the base URL and then you have the path and then you put as input to country that you want and we have the result so what we want here is confirmed confirmed cases dead cases recover active we are going to calculate and the date okay so let's create our action in flow designer okay so we are going to create our rest action in flow designer so let's click on create application file look for action click on created it will open up a new page let's give it a title here so it's going to be get historical data import for example the title of our action so this is where this is the place basically where we are going to send a create the request and also pass the response so click on plus and look for arrest under integration get crest and then let's give it a title for our rest request it's going to be rest for example rest to get historical data and under connection make sure that you have defined connection in line and just paste the URL that you have here and then just the first part it will be our base URL the second part is our wrestle spot and then click on enable retry policy that's going to retry the request many time if the response is taking it's taking too much time to get the response so it's going to try multiple time so here we are creating our country input variable so instead of having India in our ear we can just drag-and-drop data PL so we're going to put the value India for example here and then I'm going to delete this text here and then just drag and drop the country data appear so you can have automatically the value in the state of view every time you are going to send the request so that's it so we have done for this part in the next part we will be writing our script now to parse the response body
https://www.youtube.com/watch?v=NEvBNCN7jpE