Api Interview Questions
Api Interview Questions
Rahul Shetty
7. What are Path Parameters and Query Parameters for below API
request URL
http:/rahulshettyacademy.com/orders/112234?location=IND
9. What could be the HTTP Method for below API Scenario? Answer if
it is GET or POST
Scenario: An API which has Endpoint, Parameters, Headers, cookies and Payload
Ans :
10. What are the differences between API testing and UI testing?
UI (User Interface) testing means the testing of the graphical user interface. The focus of UI
testing is on the look and feel of the application. In user interface testing the main focus is on
how users can interact with app elements such as images, fonts, layout etc. are checked.
API testing allows the communication between two software systems. API testing works on
backend also known as backend testing.
14. Can you use GET request instead of PUT to create a resource?
No, GET request only allows read only rights. It enables you to retrieve data from a server but
not create a resource. PUT or POST methods should be used to create a resource.
POST should be used when the client sends the page to the server and then the server lets the
client know where it put it. PUT should be used when the client specifies the location of the
page
15. Can you use POST request instead of PUT to create a resource?
Yes We can. Because POST is super set of all other HTTP methods except GET
We shall define all the request details and Send it to sever in GIVEN, WHEN , THEN methods
Serialization in Rest Assured context is a process of converting a Java object into Request
body (Payload)
Rest Assured also Supports deserialization by converting Response body back to Java
object
21. List out few common Json Parsing Techniques used in Rest Assured
Automation?
Json Path
Deserialization of Json using POJO Classes
22. How would you send attachments to API using Rest Assured Test?
Using MultiPart method
23. Different Status Codes and their descriptions
"dashboard": {
"purchaseAmount": 910,
"website": "rahulshettyacademy.com"
},
"courses": [
"price": 50,
"copies": 6,
"details":
"site" : "http://rahulshettyacademy.com"
},
"title": "Cypress",
"price": 40,
"copies": 4
},
"title": "RPA",
"price": 45,
"copies": 10
}
]