In this section, we will learn how to create a RESTfull API Project and about RESTfull API Parameters:
We have already talked about RESTfull APIs definitions now in this blog we will see how we can create a RESTfull API project:
Step1: Go to SOAPUI tool and File > New REST Project or In Icon Toolbar click on 'REST'.
Step2: In google search "sample rest API employee API" as per below images and copy highlighted URLs:
We have already talked about RESTfull APIs definitions now in this blog we will see how we can create a RESTfull API project:
Step1: Go to SOAPUI tool and File > New REST Project or In Icon Toolbar click on 'REST'.
Step2: In google search "sample rest API employee API" as per below images and copy highlighted URLs:
Step3: Enter the copied URL in the URI path and click on the OK button.
Step4: After performing Step 3 one new project will create. Right-click on newly created project > click on 'New REST Service from URI'.
Step 5: Enter the second copied URL.
Step 6: As per below images create new 'TestSuite', 'TestCase', 'TestStep'.
Step 7: Run both TestSteps which we have imported.
The key principles of REST APIs:
a. In Step7 we have added Query Parameter 'countryName'. In the rest API, we pass BaseURL, Resource, and Parameters with RESTfull API URL.
Example -
Base URL – www.google.com
Resource – search
Parameter - q=soap , rlz=1C1GCEU_enIN821IN821
Resources are separated by ?
Parameters are separated by &
Interview Question from this Page:
Interview Question from this Page:
a. What is Endpoint?
Answer - It is the Ip address of the Server where Webservice is running.
b. What methods does REST Support?
Answer - GET, POST, DELETE, and PUT
c. What is Swagger?
Answer - Swagger we use for API documentation. Lot of good product companies use Swagger. We can say it is technical documentation.
In swagger we can Hit the API by TryOut this is the good advantage of Swagger tool.
c. What is Swagger?
Answer - Swagger we use for API documentation. Lot of good product companies use Swagger. We can say it is technical documentation.
In swagger we can Hit the API by TryOut this is the good advantage of Swagger tool.














No comments:
Post a Comment