0
0
HLDsystem_design~5 mins

REST API design for systems in HLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does REST stand for in REST API?
REST stands for Representational State Transfer. It is an architectural style for designing networked applications.
Click to reveal answer
beginner
Why should REST APIs use nouns in their endpoint URLs instead of verbs?
REST APIs use nouns to represent resources because HTTP methods (GET, POST, PUT, DELETE) define the action. This keeps URLs simple and consistent.
Click to reveal answer
intermediate
What HTTP method is typically used to update an existing resource in REST API?
The PUT method is typically used to update an existing resource completely, while PATCH is used for partial updates.
Click to reveal answer
beginner
What is the purpose of status codes in REST API responses?
Status codes tell the client if the request was successful or if there was an error, and what type of error occurred. For example, 200 means success, 404 means resource not found.
Click to reveal answer
intermediate
How can REST APIs handle versioning to maintain backward compatibility?
Versioning can be handled by including the version number in the URL path (e.g., /v1/resource) or in request headers. This allows clients to use different API versions without breaking.
Click to reveal answer
Which HTTP method is used to retrieve data from a REST API?
APOST
BPUT
CGET
DDELETE
In REST API design, what should the URL /users/123 represent?
AA list of all users
BA specific user resource with ID 123
CAn action to update user 123
DA login endpoint
What status code indicates that a resource was not found?
A404
B201
C200
D500
Which HTTP method is best for creating a new resource?
ADELETE
BGET
CPUT
DPOST
How can you version a REST API to avoid breaking existing clients?
AInclude version number in URL or headers
BAvoid using HTTP status codes
CUse only POST method
DChange URLs randomly
Explain the key principles of REST API design and why they matter.
Think about how REST APIs organize resources and communicate actions.
You got /5 concepts.
    Describe how you would design a REST API endpoint for managing books in a library system.
    Focus on resource naming and HTTP methods.
    You got /6 concepts.