Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
PIs? HTTP status codes are 3-digit numbers returned by the server to indicate the result of a client request. They are important because they: Communicate success, failure, or redirection. Help clients handle responses c…
HTTP status codes are 3-digit numbers returned by the server to indicate the result of a client request. They are important because they: Communicate success, failure, or redirection. Help clients handle responses consis…
Answer: It indicates the request was successful, and the server is returning the expected response body (e.g., GET request returning data). What interviewers expect A clear definition tied to REST API in ASP.NET Web API…
Answer: It indicates that a new resource was successfully created. Usually returned after a POST request, along with a Location header pointing to the new resource. What interviewers expect A clear definition tied to RES…
Answer: Returned when the request is malformed or invalid, such as: Missing required parameters. Invalid JSON format. Wrong data type provided. What interviewers expect A clear definition tied to REST API in ASP.NET Web…
Answer: It means the client is not authenticated (missing/invalid credentials). The request cannot proceed without proper authentication (e.g., missing token). What interviewers expect A clear definition tied to REST API…
Answer: 404 Not Found → The resource does not exist (or the client requested the wrong endpoint). 410 Gone → The resource used to exist but has been permanently removed. What interviewers expect A clear definition tied t…
Answer: It indicates a server-side failure (unexpected error, crash, or unhandled exception). It’s a generic error and should be logged for debugging. What interviewers expect A clear definition tied to REST API in ASP.N…
Answer: It means the client is authenticated but not authorized to access the resource. 👉 Example: A normal user trying to access an admin-only endpoint. What interviewers expect A clear definition tied to REST API in A…
Answer: It indicates the request was well-formed (valid syntax) but could not be processed due to semantic errors. 👉 Example: Submitting a form where email is valid format but already exists. What interviewers expect A…
Answer: It means the resource has not changed since the last request. Commonly used with caching to improve performance (client uses cached version). What interviewers expect A clear definition tied to REST API in ASP.NE…
Answer: It indicates the server timed out waiting for the client’s request. 👉 Example: Client took too long to send data in a POST request. What interviewers expect A clear definition tied to REST API in ASP.NET Web API…
Answer: 503 indicates the server is temporarily unavailable (e.g., maintenance, overload). Best practices: Return a Retry-After header. Use monitoring/alerts to restore service quickly. What interviewers expect A clear d…
Answer: 401 Unauthorized → Authentication required (client not logged in / invalid token). 403 Forbidden → Authentication is valid, but the user lacks permissions. What interviewers expect A clear definition tied to REST…
Answer: A redirect tells the client to fetch a resource from a different URL. 301 Moved Permanently → Resource moved permanently (update bookmarks/links). 302 Found → Temporary redirect (use current URL for future reques…
Statelessness means each client request to the server must contain all the necessary information to process it (like authentication token, parameters, body). The server does not store client session state. 👉 Example in…
It means REST APIs separate the client (frontend/UI) and server (backend logic, database). The client is responsible for UI and user interactions. The server manages data, business logic, and security. This separation im…
Responses from the server should indicate whether they are cacheable or not, to improve performance and scalability. Clients and intermediaries can reuse cached responses. 👉 Example in ASP.NET Core: [HttpGet("products")…
The uniform interface ensures that REST APIs follow consistent conventions for communication, making them predictable and easy to use. Key aspects: Use of standard HTTP methods (GET, POST, PUT, DELETE). Resource identifi…
In REST, resources (like users, products, orders) are identified with URLs instead of ctions. 👉 Example in ASP.NET Core Web API: // Instead of action-based GET /getUser?id=1 // Use resource-based GET /users/1 This makes…
Statelessness → No server memory required for client sessions → Easy to scale horizontally. Layered System → Load balancers, caching layers can be added without changing PI. Uniform Interface → Predictable, decouples cli…
Each request and response should have enough metadata (headers, content type, status codes) to describe how to process it, without external context. 👉 Example in ASP.NET Core: return Ok(new { Id = 1, Name = "John", Link…
Discoverability means clients can navigate and learn available actions through metadata or hypermedia links, without hardcoding routes. 👉 Example using HATEOAS in ASP.NET Core Web API: [HttpGet("users/{id}")] public IAc…
Use resource-based URLs (/users/1/orders) not action-based (/getUserOrders). ● Return proper status codes (200, 201, 400, 404, 500). Support pagination & filtering for large data. Implement authentication & autho…
Answer: Use nouns, not verbs → GET /users (not /getUsers). Use plural form → /users, /orders. Nested resources for relationships → /users/1/orders. Consistent naming conventions. Avoid exposing internal DB structure. Wha…
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
PIs?
HTTP status codes are 3-digit numbers returned by the server to indicate the result of a
client request.
They are important because they:
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
HTTP status codes are 3-digit numbers returned by the server to indicate the result of a
client request.
They are important because they:
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: It indicates the request was successful, and the server is returning the expected response body (e.g., GET request returning data).
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: It indicates that a new resource was successfully created. Usually returned after a POST request, along with a Location header pointing to the new resource.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: Returned when the request is malformed or invalid, such as: Missing required parameters. Invalid JSON format. Wrong data type provided.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: It means the client is not authenticated (missing/invalid credentials). The request cannot proceed without proper authentication (e.g., missing token).
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: 404 Not Found → The resource does not exist (or the client requested the wrong endpoint). 410 Gone → The resource used to exist but has been permanently removed.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: It indicates a server-side failure (unexpected error, crash, or unhandled exception). It’s a generic error and should be logged for debugging.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: It means the client is authenticated but not authorized to access the resource. 👉 Example: A normal user trying to access an admin-only endpoint.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: It indicates the request was well-formed (valid syntax) but could not be processed due to semantic errors. 👉 Example: Submitting a form where email is valid format but already exists.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: It means the resource has not changed since the last request. Commonly used with caching to improve performance (client uses cached version).
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: It indicates the server timed out waiting for the client’s request. 👉 Example: Client took too long to send data in a POST request.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: 503 indicates the server is temporarily unavailable (e.g., maintenance, overload). Best practices: Return a Retry-After header. Use monitoring/alerts to restore service quickly.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: 401 Unauthorized → Authentication required (client not logged in / invalid token). 403 Forbidden → Authentication is valid, but the user lacks permissions.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: A redirect tells the client to fetch a resource from a different URL. 301 Moved Permanently → Resource moved permanently (update bookmarks/links). 302 Found → Temporary redirect (use current URL for future requests).
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Statelessness means each client request to the server must contain all the necessary
information to process it (like authentication token, parameters, body). The server does not
store client session state.
👉 Example in ASP.NET Core Web API:
[HttpGet("profile")]
public IActionResult GetProfile([FromHeader] string token)
{
if (string.IsNullOrEmpty(token)) return Unauthorized();
// Token is validated each time (stateless, no session memory)
return Ok(new { Name = "John Doe", Email = "john@example.com"
});
}ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
It means REST APIs separate the client (frontend/UI) and server (backend logic,
database).
This separation improves scalability and flexibility.
👉 Example:
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Responses from the server should indicate whether they are cacheable or not, to improve
performance and scalability. Clients and intermediaries can reuse cached responses.
👉 Example in ASP.NET Core:
[HttpGet("products")]
[ResponseCache(Duration = 60)] // Cache for 60 seconds
public IActionResult GetProducts()
{
return Ok(new[] { "Laptop", "Mouse", "Keyboard" });
}ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
The uniform interface ensures that REST APIs follow consistent conventions for
communication, making them predictable and easy to use.
Key aspects:
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
In REST, resources (like users, products, orders) are identified with URLs instead of
ctions.
👉 Example in ASP.NET Core Web API:
// Instead of action-based
GET /getUser?id=1
// Use resource-based
GET /users/1
This makes APIs cleaner and more intuitive.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
horizontally.
PI.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Each request and response should have enough metadata (headers, content type, status
codes) to describe how to process it, without external context.
👉 Example in ASP.NET Core:
return Ok(new
{
Id = 1,
Name = "John",
Links = new[] { new { Rel = "self", Href = "/users/1" } }
});
Here, the response describes itself (content type = JSON, includes resource links).
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Discoverability means clients can navigate and learn available actions through metadata
or hypermedia links, without hardcoding routes.
👉 Example using HATEOAS in ASP.NET Core Web API:
[HttpGet("users/{id}")]
public IActionResult GetUser(int id)
{
var user = new { Id = id, Name = "Alice" };
var response = new
{
user,
links = new[]
{
new { rel = "self", href = Url.Action("GetUser", new {
id }) },
new { rel = "orders", href = Url.Action("GetUserOrders",
new { id }) }
}
};
return Ok(response);
}
The API response itself guides the client to related resources (user’s orders, profile, etc.).
Q&A
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
(/getUserOrders).
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Answer: Use nouns, not verbs → GET /users (not /getUsers). Use plural form → /users, /orders. Nested resources for relationships → /users/1/orders. Consistent naming conventions. Avoid exposing internal DB structure.
In a production ASP.NET Web API application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.