Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 401–425 of 3281

Career & HR topics

By tech stack

Popular tracks

Mid PDF
Can the PUT method be used to create a resource in REST APIs?

Short answer: Yes. If the resource does not exist, PUT can create it at the specified URI. Example: 👉 PUT /users/100 → If user 100 doesn’t exist, it will be created. Real-world example (ShopNest) Creating an order is PO…

REST API Read answer
Mid PDF
How does the PATCH method work differently from PUT?

Short answer: PATCH → Updates only the specified fields (partial update). PUT → Replaces the entire resource representation. 👉 Example code PATCH /users/1 { "email": "new@email.com" } → Updates only…

REST API Read answer
Mid PDF
What HTTP method would you use for fetching data from a REST

Short answer: PI? The GET method is used to fetch data because it is safe, idempotent, and optimized for retrieval operations. Real-world example (ShopNest) Creating an order is POST /api/orders → 201 with Location heade…

REST API Read answer
Mid PDF
What HTTP method would you use for fetching data from a REST API?

Short answer: The GET method is used to fetch data because it is safe, idempotent, and optimized for retrieval operations. Real-world example (ShopNest) Creating an order is POST /api/orders → 201 with Location header. F…

REST API Read answer
Mid PDF
What are HTTP status codes, and why are they important in RESTful

Short answer: 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 hand…

REST API Read answer
Mid PDF
What are HTTP status codes, and why are they important in RESTful APIs?

Short answer: 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 re…

REST API Read answer
Mid PDF
What does the 201 Created status code mean?

Short 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. Real-world example (ShopNest) Creating an order i…

REST API Read answer
Mid PDF
When should you return a 400 Bad Request?

Short answer: Returned when the request is malformed or invalid, such as: Missing required parameters. Invalid JSON format. Wrong data type provided. Real-world example (ShopNest) ShopNest exposes REST APIs for cart and…

REST API Read answer
Mid PDF
What does a 401 Unauthorized status code indicate?

Short answer: It means the client is not authenticated (missing/invalid credentials). The request cannot proceed without proper authentication (e.g., missing token). Say this in the interview Define — one clear sentence…

REST API Read answer
Mid PDF
What does the 403 Forbidden status code mean?

Short 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. Real-world example (ShopNest) Creating an order is POST /ap…

REST API Read answer
Mid PDF
What does a 304 Not Modified status code mean?

Short answer: It means the resource has not changed since the last request. Commonly used with caching to improve performance (client uses cached version). Real-world example (ShopNest) Creating an order is POST /api/ord…

REST API Read answer
Mid PDF
How do you handle a 503 Service Unavailable error in a REST API?

Short 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. Say this in the interview De…

REST API Read answer
Mid PDF
Explain the concept of "Redirect" and provide an example status code (like 301, 302).

Short 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…

REST API Read answer
Mid PDF
Explain the concept of resource-based URLs in REST.

Short answer: In REST, resources (like users, products, orders) are identified with URLs instead of actions. 👉 Example in ASP.NET Core Web API: // Instead of action-based GET /getUser?id=1 // Use resource-based GET /use…

REST API Read answer
Mid PDF
How does REST ensure scalability and flexibility in API design?

Short answer: Statelessness → No server memory required for client sessions → Easy to scale horizontally. Layered System → Load balancers, caching layers can be added without changing API. Uniform Interface → Predictable…

REST API Read answer
Mid PDF
What does it mean for an API to be discoverable?

Short answer: (With C# ASP.NET Core Web API example) Discoverability means clients can navigate and learn available actions through metadata or hypermedia links, without hardcoding routes. 👉 Example using HATEOAS in ASP…

REST API Read answer
Mid PDF
What does it mean for an API to be discoverable?

Short answer: Discoverability means clients can navigate and learn available actions through metadata or hypermedia links, without hardcoding routes. Explain a bit more 👉 Example using HATEOAS in ASP.NET Core Web API: […

REST API Read answer
Mid PDF
What are the best practices for designing RESTful APIs?

Short answer: 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 authenticati…

REST API Read answer
Mid PDF
How should you structure your API endpoints?

Short 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 structur…

REST API Read answer
Mid PDF
What are the key factors to consider when designing a RESTful API?

Short answer: Consistency in naming and responses. Error handling with meaningful messages. Security (HTTPS, JWT, OAuth2). Scalability (statelessness, caching). Performance (pagination, filtering). Documentation (Swagger…

REST API Read answer
Mid PDF
How would you handle error responses in a REST API?

Short answer: Return proper status codes and a structured error object: 👉 Example in ASP.NET Core: { "status": 400, "error": "Invalid Request", "details": "Email field is req…

REST API Read answer
Mid PDF
Why is it important to include pagination in a REST API?

Short answer: Prevents large payloads. Improves performance and response times. Reduces server and network load. 👉 Example code GET /users?page=2&limit=20. Real-world example (ShopNest) Creating an order is POST /ap…

REST API Read answer
Mid PDF
How do you secure REST APIs (authentication, authorization)?

Short answer: Authentication → API Keys, JWT, OAuth2. Authorization → Role-based access control. Always use HTTPS. Validate input & sanitize data. Prevent SQL injection, XSS, CSRF. Real-world example (ShopNest) Creat…

REST API Read answer
Mid PDF
How would you deal with API deprecation?

Short answer: Provide versioning. Send Deprecation warning headers. Maintain old versions temporarily. Give developers migration guides. Real-world example (ShopNest) ShopNest exposes REST APIs for cart and checkout. Con…

REST API Read answer
Mid PDF
What are the pros and cons of using OAuth 2.0 in API

Short answer: uthentication? Pros: Secure delegated access. Widely adopted (Google, Facebook, GitHub). Works well for 3rd-party apps. Cons: Complex implementation. Requires token management. Overhead for small/simple API…

REST API Read answer

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Yes. If the resource does not exist, PUT can create it at the specified URI. Example: 👉 PUT /users/100 → If user 100 doesn’t exist, it will be created.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: PATCH → Updates only the specified fields (partial update). PUT → Replaces the entire resource representation. 👉

Example code

PATCH /users/1 { "email": "new@email.com" } → Updates only the email. PUT /users/1 { "name": "John" } → May overwrite other fields like email if not included.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: PI? The GET method is used to fetch data because it is safe, idempotent, and optimized for retrieval operations.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: The GET method is used to fetch data because it is safe, idempotent, and optimized for retrieval operations.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: 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 consistently. Provide debugging and monitoring information.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: 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 consistently. Provide debugging and monitoring information.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short 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.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Returned when the request is malformed or invalid, such as: Missing required parameters. Invalid JSON format. Wrong data type provided.

Real-world example (ShopNest)

ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: It means the client is not authenticated (missing/invalid credentials). The request cannot proceed without proper authentication (e.g., missing token).

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short 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.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: It means the resource has not changed since the last request. Commonly used with caching to improve performance (client uses cached version).

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short 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.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short 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).

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: In REST, resources (like users, products, orders) are identified with URLs instead of actions. 👉 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.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Statelessness → No server memory required for client sessions → Easy to scale horizontally. Layered System → Load balancers, caching layers can be added without changing API. Uniform Interface → Predictable, decouples client and server. Cacheability → Reduces server load.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: (With C# ASP.NET Core Web API example) 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)

Example code

{
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

Real-world example (ShopNest)

ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Discoverability means clients can navigate and learn available actions through metadata or hypermedia links, without hardcoding routes.

Explain a bit more

👉 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.). 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

Real-world example (ShopNest)

ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: 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 & authorization (JWT, OAuth2). Ensure statelessness. Provide versioning (v1, v2). Secure API with HTTPS only.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short 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.

Real-world example (ShopNest)

ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Consistency in naming and responses. Error handling with meaningful messages. Security (HTTPS, JWT, OAuth2). Scalability (statelessness, caching). Performance (pagination, filtering). Documentation (Swagger/OpenAPI).

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Return proper status codes and a structured error object: 👉 Example in ASP.NET Core: { "status": 400, "error": "Invalid Request", "details": "Email field is required" }

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Prevents large payloads. Improves performance and response times. Reduces server and network load. 👉

Example code

GET /users?page=2&limit=20.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Authentication → API Keys, JWT, OAuth2. Authorization → Role-based access control. Always use HTTPS. Validate input & sanitize data. Prevent SQL injection, XSS, CSRF.

Real-world example (ShopNest)

Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: Provide versioning. Send Deprecation warning headers. Maintain old versions temporarily. Give developers migration guides.

Real-world example (ShopNest)

ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Web API ASP.NET Core Web API Tutorial · REST API

Short answer: uthentication? Pros: Secure delegated access. Widely adopted (Google, Facebook, GitHub). Works well for 3rd-party apps. Cons: Complex implementation. Requires token management. Overhead for small/simple APIs.

Real-world example (ShopNest)

ShopNest mobile app sends a JWT Bearer token. The API validates it and uses the user id from claims to load that user’s cart only.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details