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 626–650 of 4608

Career & HR topics

By tech stack

Popular tracks

Junior PDF
What is the purpose of using JSON in RESTful APIs?

Short answer: Lightweight and easy to parse. Language independent. Human-readable. Supported natively by JavaScript and most frameworks. Real-world example (ShopNest) Creating an order is POST /api/orders → 201 with Loca…

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
Junior PDF
What is the best practice for handling rate limiting in REST APIs?

Short answer: Use throttling to limit requests per minute/hour per client. Return 429 Too Many Requests. Provide Retry-After header. Tools: API Gateway, NGINX, Middleware. Real-world example (ShopNest) Creating an order…

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
Junior PDF
What is an API key, and how do you use it in a RESTful API?

Short answer: An API key is a unique token used to authenticate requests. 👉 Example code GET /users?apikey=12345 Best practice: Send in headers → Authorization: ApiKey 12345. Real-world example (ShopNest) Creating an or…

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
Mid PDF
What are the pros and cons of using OAuth 2.0 in API authentication?

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

REST API Read answer
Mid PDF
How would you ensure that a REST API is idempotent?

Short answer: GET, PUT, DELETE → Ensure repeated requests produce the same result. Avoid side effects on repeated requests. Use unique request IDs for POST (to prevent duplicate creation). Real-world example (ShopNest) C…

REST API Read answer
Mid PDF
What are the common security vulnerabilities in RESTful APIs?

Short answer: SQL Injection Cross-Site Scripting (XSS) Cross-Site Request Forgery (CSRF) Broken Authentication Insecure Direct Object References (IDOR) Unencrypted data transmission Real-world example (ShopNest) Creating…

REST API Read answer
Mid PDF
How can you prevent SQL injection in REST API requests?

Short answer: Always use parameterized queries / ORM (EF Core). Validate and sanitize input. Apply least privilege on DB users. 👉 Example in EF Core: var user = db.Users.FirstOrDefault(u => u.Email == email); Real-wo…

REST API Read answer
Mid PDF
What are the security concerns with CORS (Cross-Origin Resource Sharing) in REST APIs?

Short answer: Malicious sites could misuse APIs if CORS is too permissive. Always restrict origins (Access-Control-Allow-Origin). Avoid * in production. Use tokens for security. Say this in the interview Define — one cle…

REST API Read answer
Mid PDF
How would you handle logging and monitoring for a REST API?

Short answer: Use structured logging (Serilog, NLog). Log important events (auth failures, errors, requests). Implement monitoring tools (Application Insights, ELK Stack). Add correlation IDs for tracing requests. Real-w…

REST API Read answer
Mid PDF
How do you handle versioning in a REST API URL?

Short answer: URI Versioning → /api/v1/users Header Versioning → Accept: application/vnd.myapi.v2+json Best practice: URI versioning for clarity. Real-world example (ShopNest) Creating an order is POST /api/orders → 201…

REST API Read answer
Mid PDF
What are some common API response formats besides JSON?

Short answer: XML YAML CSV Protocol Buffers (gRPC) Plain text Real-world example (ShopNest) ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services. Say this i…

REST API Read answer
Junior PDF
What is the difference between a synchronous and asynchronous RESTful API?

Short answer: Synchronous → Client waits until the server responds (blocking). Asynchronous → Server processes request in background and may send response later (via polling, callbacks, or webhooks). Real-world example (…

REST API Read answer
Mid PDF
What are webhooks, and how can they be used in a RESTful API?

Short answer: Webhooks are server-to-server callbacks triggered by events. 👉 Example: Stripe API calls your endpoint /payment/confirmed when a payment succeeds. Real-world example (ShopNest) Creating an order is POST /a…

REST API Read answer
Junior PDF
What is the role of the OPTIONS HTTP method in RESTful APIs?

Short answer: Used for CORS preflight requests. Tells the client which HTTP methods and headers are allowed. 👉 Example Response: Allow: GET, POST, PUT, DELETE Access-Control-Allow-Origin: * Real-world example (ShopNest)…

REST API Read answer
Mid PDF
What are the considerations for pagination in a REST API?

Short answer: Always return limited results (avoid huge payloads). Provide page and limit parameters → /users?page=2&limit=20. Return metadata → { "page": 2, "totalPages": 10 }. Support cursor-bas…

REST API Read answer
Junior PDF
What is the importance of API documentation?

Short answer: Provides clear usage guidelines for developers. Reduces onboarding time for new teams. Ensures consistency across different services. Helps with discoverability of endpoints, parameters, request/response fo…

REST API Read answer
Mid PDF
How can you automate API testing?

Short answer: Use tools like Postman Collections, Newman, RestAssured (Java), Supertest (Node.js), xUnit/NUnit (C#). Integrate tests into CI/CD pipelines (Jenkins, GitHub Actions, Azure DevOps). Automate unit, integratio…

REST API Read answer
Mid PDF
How do you handle long-running requests in REST APIs?

Short answer: Async Processing → Return 202 Accepted with a status URL (/jobs/{id}). Client polls the status endpoint until job is complete. Optionally use Webhooks for notifying clients. 👉 Example: File processing, rep…

REST API Read answer
Junior PDF
What is an API Gateway, and when would you use it in an

Short answer: rchitecture? API Gateway is a single entry point for APIs in a microservices architecture. Handles routing, load balancing, authentication, rate limiting, logging, monitoring. Examples: Kong, NGINX, AWS API…

REST API Read answer

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

Short answer: Lightweight and easy to parse. Language independent. Human-readable. Supported natively by JavaScript and most frameworks.

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: 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: Use throttling to limit requests per minute/hour per client. Return 429 Too Many Requests. Provide Retry-After header. Tools: API Gateway, NGINX, Middleware.

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: An API key is a unique token used to authenticate requests. 👉

Example code

GET /users?apikey=12345 Best practice: Send in headers → Authorization: ApiKey 12345.

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: 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

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

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

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

Short answer: GET, PUT, DELETE → Ensure repeated requests produce the same result. Avoid side effects on repeated requests. Use unique request IDs for POST (to prevent duplicate creation).

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: SQL Injection Cross-Site Scripting (XSS) Cross-Site Request Forgery (CSRF) Broken Authentication Insecure Direct Object References (IDOR) Unencrypted data transmission

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: Always use parameterized queries / ORM (EF Core). Validate and sanitize input. Apply least privilege on DB users. 👉 Example in EF Core: var user = db.Users.FirstOrDefault(u => u.Email == email);

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: Malicious sites could misuse APIs if CORS is too permissive. Always restrict origins (Access-Control-Allow-Origin). Avoid * in production. Use tokens for security.

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 structured logging (Serilog, NLog). Log important events (auth failures, errors, requests). Implement monitoring tools (Application Insights, ELK Stack). Add correlation IDs for tracing 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: URI Versioning → /api/v1/users Header Versioning → Accept: application/vnd.myapi.v2+json Best practice: URI versioning for clarity.

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: XML YAML CSV Protocol Buffers (gRPC) Plain text

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: Synchronous → Client waits until the server responds (blocking). Asynchronous → Server processes request in background and may send response later (via polling, callbacks, or webhooks).

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: Webhooks are server-to-server callbacks triggered by events. 👉 Example: Stripe API calls your endpoint /payment/confirmed when a payment succeeds.

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: Used for CORS preflight requests. Tells the client which HTTP methods and headers are allowed. 👉 Example Response: Allow: GET, POST, PUT, DELETE Access-Control-Allow-Origin: *

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: Always return limited results (avoid huge payloads). Provide page and limit parameters → /users?page=2&limit=20. Return metadata → { "page": 2, "totalPages": 10 }. Support cursor-based pagination for large datasets.

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: Provides clear usage guidelines for developers. Reduces onboarding time for new teams. Ensures consistency across different services. Helps with discoverability of endpoints, parameters, request/response formats. 👉 Tools: Swagger (OpenAPI), Postman, Redoc.

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 tools like Postman Collections, Newman, RestAssured (Java), Supertest (Node.js), xUnit/NUnit (C#). Integrate tests into CI/CD pipelines (Jenkins, GitHub Actions, Azure DevOps). Automate unit, integration, and load tests. Ensure regression testing after deployments.

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: Async Processing → Return 202 Accepted with a status URL (/jobs/{id}). Client polls the status endpoint until job is complete. Optionally use Webhooks for notifying clients. 👉 Example: File processing, report generation.

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: rchitecture? API Gateway is a single entry point for APIs in a microservices architecture. Handles routing, load balancing, authentication, rate limiting, logging, monitoring. Examples: Kong, NGINX, AWS API Gateway, Azure API Management. Use when: You have multiple microservices. Need centralized authentication/security. Need rate limiting or… monitoring.

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