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?
✗ Incorrect
GET is used to retrieve data without changing the resource.
In REST API design, what should the URL /users/123 represent?
✗ Incorrect
URLs represent resources, so /users/123 points to the user with ID 123.
What status code indicates that a resource was not found?
✗ Incorrect
404 means the requested resource does not exist.
Which HTTP method is best for creating a new resource?
✗ Incorrect
POST is used to create new resources.
How can you version a REST API to avoid breaking existing clients?
✗ Incorrect
Including version info in URLs or headers helps maintain backward compatibility.
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.