11 REST Interview Questions That Decide Indian Tech Offers

The 11 REST interview questions Indian tech interviewers ask most, with answers on HTTP methods, status codes, idempotency, security and pagination.

PrepFox Team·
11 REST Interview Questions That Decide Indian Tech Offers

11 REST Interview Questions That Decide Indian Tech Offers

Backend and full-stack interviews in India almost always open with REST. LinkedIn currently lists over 11,000 open API developer roles across the country, and AmbitionBox salary data shows junior backend developers earning ₹1–5.5 lakh a year as freshers — with "REST APIs" in almost every job description. Whatever your stack, interviewers use REST questions to separate candidates who have actually built APIs from those who have only read about them. Here are the 11 questions that come up most, with the answers interviewers want to hear.

1. What is REST?

REST (Representational State Transfer) is an architectural style for designing networked services, defined by Roy Fielding in his 2000 dissertation. A REST API exposes resources through URLs and uses HTTP methods to act on them. Give a one-line definition, then an example: /orders/42 identifies a resource, GET reads it, DELETE removes it.

2. How is REST different from SOAP?

SOAP is a strict XML messaging protocol; REST is a style that typically uses JSON over plain HTTP. REST is lighter, caches better, and dominates modern web and mobile backends. SOAP survives in banking and legacy enterprise systems where formal contracts matter.

3. Which HTTP methods should a REST API use, and when?

GET reads a resource without side effects. POST creates a new resource. PUT replaces a resource entirely. PATCH applies a partial update. DELETE removes it. Interviewers listen for verb choice — reaching for POST to update a record when PUT fits signals inexperience.

4. What do the common status codes mean?

200 OK for success, 201 Created after a POST, 204 No Content after a successful DELETE, 400 for a malformed request, 401 for unauthenticated, 403 for unauthorized, 404 for not found, 429 for rate limiting, and 500 for a server error. Name the exact code and the situation — vague answers like "4xx means client error" are what interviewers push back on.

5. Which methods are idempotent, and why does it matter?

GET, PUT and DELETE are idempotent — calling them repeatedly leaves the resource in the same state. POST is not: retrying it can create duplicate orders. This matters for retries, because a failed request to an idempotent endpoint can be safely re-sent while a failed POST cannot.

6. What does statelessness mean in REST?

Every request carries everything the server needs — no session state is stored between calls. The server treats each request independently, which is what lets you scale horizontally behind a load balancer. Mention JWTs as the common way to stay stateless while still authenticating each request.

7. What is the difference between PUT and PATCH?

PUT replaces the full resource — you send the complete object. PATCH sends only the changed fields. If a PUT request omits a field, that field is gone; a PATCH leaves it untouched. Interviewers often follow up with "which would you use to update a phone number?" — the answer is PATCH.

8. How do you secure a REST API?

HTTPS everywhere, token-based authentication (JWT) or OAuth 2.0 for third-party access, per-resource authorization checks, input validation, and rate limiting. A concrete example lands better than a list: a user requesting /orders/99 that belongs to someone else must get a 403 — never trust a user ID from the request body.

9. Why do APIs need versioning, and how do you version one?

Versioning lets you change an API without breaking existing clients. Path versioning (/v1/orders) is the most common approach; header versioning is an alternative. Explain the trade-off with a failure mode: removing a field in v1 silently breaks mobile apps that users never update.

10. How do you handle large datasets — pagination?

Never return everything. Offset pagination (?page=3&limit=20) is simple but slows on deep pages; cursor pagination scales better for feeds and infinite scroll. Mention what you return besides the data — a total count, a next cursor, or both.

11. What is rate limiting and the 429 code?

Rate limiting caps how many requests a client can make in a window, protecting the server from abuse. When the cap is hit, the API returns 429 Too Many Requests, ideally with a Retry-After header. If asked how you would implement it, say a token bucket per API key, backed by Redis in production.

How to prepare in three days

Day one: build a small CRUD API in your preferred stack and call every method yourself with Postman. Day two: trace each request through its verb, status code, and payload, and say the answers aloud. Day three: run a mock interview — practicing out loud exposes the answers you cannot actually finish. PrepFox's AI mock interview drills backend questions with instant feedback, and our guides on Node.js interview questions and MongoDB interview questions cover the stack that usually pairs with REST rounds.

Bottom line

REST interviews are won on precision: the right verb, the right status code, and the reason behind both. Build one small API end to end and you will answer nine of these eleven questions from experience instead of memory. For extra practice before your round, restfulapi.net's 30-question set and Internshala's 50-question guide are solid sources.

Ready to put this into practice?

Practice mock interviews, build your resume, and get expert feedback — all on PrepFox.