API REST API Testing 1 — Questions and Answers
Question 1: Which HTTP method is used to retrieve a resource without modifying it in REST API testing?
- GET (Correct answer)
- POST
- PUT
- DELETE
Correct answer: GET
GET is the idempotent HTTP method used solely to retrieve resources without causing any side effects.
Question 2: What HTTP status code indicates a successful resource creation via a POST request?
- 200 OK
- 201 Created (Correct answer)
- 204 No Content
- 301 Moved Permanently
Correct answer: 201 Created
201 Created is the standard response code indicating that a new resource has been successfully created.
Question 3: Which tool is widely used for manually testing REST APIs with a GUI interface?
- Selenium
- Postman (Correct answer)
- JMeter
- SoapUI
Correct answer: Postman
Postman is the most popular GUI-based tool for manually crafting and sending REST API requests.
Question 4: What does the HTTP status code 404 mean in a REST API response?
- Unauthorized
- Server Error
- Not Found (Correct answer)
- Bad Request
Correct answer: Not Found
404 Not Found indicates that the requested resource does not exist on the server.
Question 5: Which REST API testing concept ensures the same request always produces the same result?
- Statelessness
- Idempotency (Correct answer)
- Caching
- Pagination
Correct answer: Idempotency
Idempotency means that making the same API call multiple times produces the same result as making it once.
Question 6: What format do most modern REST APIs use to exchange data?
- XML
- CSV
- JSON (Correct answer)
- YAML
Correct answer: JSON
JSON (JavaScript Object Notation) is the de facto standard data format for REST API request and response bodies.
Which HTTP method is used to retrieve a resource without modifying it in REST API testing?