Can you speak about RESTful API principles?
1Times asked
Jul 2026Last seen
Jul 2026First seen
💡 Model Answer
RESTful APIs are built on a set of architectural principles that enable scalable, stateless communication between clients and servers. The core principles are:
- Statelessness – Each request contains all the information needed to process it; the server does not store session state.
- Resource identification – Resources are identified by URIs (e.g., /users/123). Clients interact with resources, not with actions.
- Uniform interface – Standard HTTP methods (GET, POST, PUT, DELETE, PATCH) are used to perform CRUD operations. Responses use standard status codes and media types (JSON, XML).
- Representation – A resource can have multiple representations; the client negotiates the desired format via Accept headers.
- Hypermedia as the engine of application state (HATEOAS) – Responses include links to related actions, guiding the client.
- Caching – Proper use of Cache-Control, ETag, and Last-Modified headers improves performance.
Example: A GET /orders/456 returns a JSON representation of order 456, with links to /orders/456/items and /orders/456/cancel. The server remains stateless, and the client can navigate using these links.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500