Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: Statelessness → Each request is independent; the server doesn’t store client state. Explain a bit more Client-Server Architecture → Separation of concerns between client UI and server logic. Uniform Interfa…
Short answer: uthorization: Bearer <token> 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 i…
Short answer: Client sends token in Authorization header: Authorization: Bearer <token> Real-world example (ShopNest) ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in…
Short answer: REST → Lightweight, uses HTTP, usually JSON, easy to use, stateless. SOAP → Protocol-based, uses XML, more complex, built-in security & transactions. REST is more flexible and widely used for web and mo…
Short answer: Stateless means the server does not store client session data. Each request must contain all the necessary information (like authentication tokens). This makes APIs scalable and reliable. Real-world example…
Short answer: Platform-independent (works across web, mobile, IoT). Simple, flexible, and scalable. Uses existing HTTP infrastructure. Lightweight (JSON/XML). Supports caching for better performance. Real-world example (…
Short answer: Easier to learn & implement. Supports multiple formats (JSON, XML, plain text). Faster (less overhead). Works seamlessly with modern web & mobile apps. Better performance due to caching & statel…
Short answer: Suppose we have a User Service API: GET /users → Get all users GET /users/1 → Get user with ID=1 POST /users → Create a new user PUT /users/1 → Update user with ID=1 DELETE /users/1 → Delete user with ID=1…
Short answer: HATEOAS (Hypermedia As The Engine Of Application State) means responses contain links to related actions/resources. 👉 Example code { "id": 1, "name": "John", "links"…
Short answer: Common methods: API Keys → Simple tokens. Basic Auth → Username & password (not secure without HTTPS). OAuth 2.0 / OpenID Connect → Standard protocols for secure access. JWT (JSON Web Tokens) → Widely u…
Short answer: GET → Used to retrieve data, should not modify server state, and can be cached/bookmarked. POST → Used to create new resources or submit data. It modifies server state, is not idempotent, and cannot be cach…
Short answer: 200 OK → If the resource was successfully deleted and a response body is returned. 204 No Content → If the resource was deleted but no body is needed. 404 Not Found → If the resource does not exist. Real-wo…
Short answer: Safe → Because it only retrieves data without modifying server state. Idempotent → Multiple GET requests have the same result; no side effects occur. Real-world example (ShopNest) Creating an order is POST…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: Statelessness → Each request is independent; the server doesn’t store client state.
Client-Server Architecture → Separation of concerns between client UI and server logic. Uniform Interface → Standard HTTP methods and URIs. Cacheable → Responses can be cached to improve performance. Layered System → APIs can use intermediaries (like load balancers, proxies). Resource-based → Everything is treated as a resource (like users, orders, products).
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: uthorization: Bearer <token>
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.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: Client sends token in Authorization header: Authorization: Bearer <token>
ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: REST → Lightweight, uses HTTP, usually JSON, easy to use, stateless. SOAP → Protocol-based, uses XML, more complex, built-in security & transactions. REST is more flexible and widely used for web and mobile apps.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: Stateless means the server does not store client session data. Each request must contain all the necessary information (like authentication tokens). This makes APIs scalable and reliable.
ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: Platform-independent (works across web, mobile, IoT). Simple, flexible, and scalable. Uses existing HTTP infrastructure. Lightweight (JSON/XML). Supports caching for better performance.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: Easier to learn & implement. Supports multiple formats (JSON, XML, plain text). Faster (less overhead). Works seamlessly with modern web & mobile apps. Better performance due to caching & statelessness.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: Suppose we have a User Service API: GET /users → Get all users GET /users/1 → Get user with ID=1 POST /users → Create a new user PUT /users/1 → Update user with ID=1 DELETE /users/1 → Delete user with ID=1 This shows how CRUD operations map directly to HTTP methods.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: HATEOAS (Hypermedia As The Engine Of Application State) means responses contain links to related actions/resources. 👉
{ "id": 1, "name": "John", "links": [ { "rel": "self", "href": "/users/1" }, { "rel": "orders", "href": "/users/1/orders" } } This helps clients navigate APIs dynamically.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: Common methods: API Keys → Simple tokens. Basic Auth → Username & password (not secure without HTTPS). OAuth 2.0 / OpenID Connect → Standard protocols for secure access. JWT (JSON Web Tokens) → Widely used for stateless authentication.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: GET → Used to retrieve data, should not modify server state, and can be cached/bookmarked. POST → Used to create new resources or submit data. It modifies server state, is not idempotent, and cannot be cached.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: 200 OK → If the resource was successfully deleted and a response body is returned. 204 No Content → If the resource was deleted but no body is needed. 404 Not Found → If the resource does not exist.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
ASP.NET Web API ASP.NET Core Web API Tutorial · REST API
Short answer: Safe → Because it only retrieves data without modifying server state. Idempotent → Multiple GET requests have the same result; no side effects occur.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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. 👉
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.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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.
ShopNest exposes REST APIs for cart and checkout. Controllers stay thin; business rules live in application services.
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).
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.
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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).
Creating an order is POST /api/orders → 201 with Location header. Fetching is GET /api/orders/{id} → 200 or 404.
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.
Install Toolliyo like an app Free
Home-screen access to tutorials, coding practice & career tools — no app store needed.
On iPhone/iPad: tap Share then Add to Home Screen.