All questions
of 44What are the main HTTP methods used in REST APIs and their purposes?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
The main HTTP methods (verbs) used in REST APIs are:
- GET: Retrieves data from the server. Should be safe and idempotent.
- POST: Creates new resources or submits data for processing.
- PUT: Updates an entire resource or creates it if it doesn't exist. Should be idempotent.
- PATCH: Partially updates a resource.
- DELETE: Removes a resource. Should be idempotent.
- HEAD: Similar to GET but returns only headers, not the body.
- OPTIONS: Returns allowed methods for a resource.
Example:
GET /users/123 # Retrieve user with ID 123
POST /users # Create a new user
PUT /users/123 # Update entire user 123
PATCH /users/123 # Partially update user 123
DELETE /users/123 # Delete user 123
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
What are HTTP status codes and give examples of common ones?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
HTTP status codes are three-digit numbers that indicate the result of an HTTP request. They are grouped into five categories:
1xx - Informational:
- 100 Continue
2xx - Success:
- 200 OK: Request successful
- 201 Created: Resource successfully created
- 204 No Content: Successful but no content to return
3xx - Redirection:
- 301 Moved Permanently
- 304 Not Modified
4xx - Client Error:
- 400 Bad Request: Invalid request syntax
- 401 Unauthorized: Authentication required
- 403 Forbidden: Access denied
- 404 Not Found: Resource doesn't exist
- 409 Conflict: Request conflicts with current state
5xx - Server Error:
- 500 Internal Server Error
- 503 Service Unavailable
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
What is the difference between PUT and POST methods?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
The key differences between PUT and POST are:
PUT:
- Idempotent: Multiple identical requests have the same effect
- Specific target: Usually targets a specific resource with known identifier
- Replace/Create: Replaces entire resource or creates if doesn't exist
- Safe to retry: Can be safely retried without side effects
POST:
- Not idempotent: Multiple requests may have different effects
- Collection target: Usually targets a collection to create new resources
- Create/Process: Creates new resources or processes data
- Not safe to retry: May create duplicate resources if retried
Examples:
PUT /users/123 # Replace/update user 123 specifically
POST /users # Create a new user (server assigns ID)
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
What makes an API RESTful?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
An API is considered RESTful when it adheres to REST architectural constraints:
- Uniform Interface: Consistent resource identification (URLs), manipulation through representations, self-descriptive messages, and HATEOAS
- Stateless: Each request is independent and contains all necessary information
- Cacheable: Responses indicate whether they can be cached
- Client-Server: Clear separation of concerns
- Layered System: Can include intermediary layers (proxies, gateways)
- Code on Demand (optional): Server can send executable code to client
Additionally, RESTful APIs typically:
- Use standard HTTP methods appropriately
- Return appropriate HTTP status codes
- Use resource-based URLs (nouns, not verbs)
- Support multiple representations (JSON, XML)
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
What is a resource in REST?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A resource in REST is any piece of information that can be named and accessed via a URI (Uniform Resource Identifier). Resources are the key abstraction in REST architecture.
Characteristics of resources:
- Identifiable: Each resource has a unique URI
- Representable: Can be represented in different formats (JSON, XML, HTML)
- Stateless: The resource's representation captures its current state
- Manipulable: Can be created, read, updated, or deleted
Examples:
- A user:
/users/123 - A collection of users:
/users - A user's orders:
/users/123/orders - A specific order:
/orders/456
Resources should be nouns, not verbs, and represent entities or collections of entities in your domain.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
What is the difference between URI, URL, and URN?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
These are related but distinct concepts:
URI (Uniform Resource Identifier):
- Generic term for any identifier that identifies a resource
- Superset that includes both URLs and URNs
- Example:
mailto:john@example.com
URL (Uniform Resource Locator):
- Type of URI that specifies location and method to access a resource
- Includes protocol, domain, and path
- Example:
https://api.example.com/users/123
URN (Uniform Resource Name):
- Type of URI that identifies a resource by name in a specific namespace
- Location-independent identifier
- Example:
urn:isbn:0451450523
In REST APIs, we primarily work with URLs to locate and access resources over HTTP.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
What are query parameters and path parameters?
What is JSON and why is it commonly used in REST APIs?
What is Content-Type header and why is it important?
What is idempotency in REST APIs and which HTTP methods are idempotent?
What is HATEOAS and how does it work?
What are the different types of API authentication methods?
What is API versioning and what are different versioning strategies?
What is content negotiation in REST APIs?
How do you handle errors in REST APIs?
What is caching in REST APIs and what are caching strategies?
What is the difference between synchronous and asynchronous APIs?
What are HTTP response headers commonly used in REST APIs?
What is rate limiting and how is it implemented?
What is pagination and what are different pagination techniques?
What is CORS and how does it affect REST APIs?
What is GraphQL and how does it compare to REST?
How do you handle file uploads in REST APIs?
What are the considerations for API deprecation?
How do you implement search functionality in REST APIs?
What are the differences between API-first and code-first approaches?
How do you implement real-time features with REST APIs?
How do you design APIs for mobile applications?
What are the security headers important for REST APIs?
How do you implement API analytics and usage tracking?
How would you design a REST API for a complex domain with relationships?
What are the security considerations for REST APIs?
How do you handle transactions and data consistency in REST APIs?
What are webhooks and how do they differ from polling?
How do you implement API documentation and what are the best practices?
What is API gateway and what are its benefits?
How do you implement API monitoring and observability?
What are microservices and how do REST APIs fit into microservices architecture?
How do you implement API testing strategies?
What are API design patterns and anti-patterns?
What is API orchestration vs choreography?
How do you handle API backward compatibility?
What are API gateways and service mesh, and how do they differ?
What are the best practices for API error handling and debugging?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
38 of 44 REST answers are gated.
Full answers, code samples, AI explanations - simpler, deeper, or as an interactive diagram. Cancel anytime.
- Full answers + code
- AI explain - simpler, deeper, or visualized
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsLAMP
Linux, Apache, MySQL, PHPRuby on Rails
Convention over ConfigurationJAM
JavaScript, APIs, and MarkupServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQFastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseWeb3 / Ethereum
Solidity, Ethereum, Hardhat, FoundryDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.