API testing & Postman
API testing checks the business logic behind the UI directly — faster and more stable than UI testing. REST API essentials:
- Methods: GET (read), POST (create), PUT/PATCH (update), DELETE (remove)
- Status codes: 2xx success (200 OK, 201 Created), 4xx client errors (400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found), 5xx server errors (500, 503)
- Request parts: URL + query params, headers (Authorization, Content-Type), body (usually JSON)
API test scenarios: success with valid data, proper errors for invalid data, 401/403 for unauthorised requests, 404 for missing resources, boundary values, response structure (schema) checks.
The 401 vs 403 difference is a frequent interview question: 401 Unauthorized — we don't know who you are (login needed); 403 Forbidden — we know who you are, but you lack permission.
📚 Sources and documentation
- HTTP response status codesofficialdeveloper.mozilla.org
- Postman documentationlearning.postman.com