Backend interviews often use this question to check API design, naming, status codes, and consistency.
0
Asked by KASA community7 Jul 20260 views
KASA answer
A good REST API is designed around resources rather than actions. It uses nouns in URLs, HTTP methods correctly, and returns predictable responses. GET should read data, POST should create, PUT or PATCH should update, and DELETE should remove. Status codes should communicate the result clearly, such as 200, 201, 400, 401, 403, 404, and 500.
For production use, the API should also include validation, authentication, authorization, pagination for lists, filtering, sorting, rate limiting, and consistent error formats. Good documentation and versioning make the API easier to maintain.
Cover these points
Resource-based URL naming.
Correct use of HTTP methods.
Meaningful status codes.
Validation and consistent error responses.
Pagination, filtering, authentication, and authorization.