APIs and REST Flashcards
7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 APIs and REST flashcards as text
Which HTTP status code indicates that a resource was successfully created?
Answer: 201 Created
201 Created is the standard response when a POST request successfully creates a new resource.
What does the HTTP OPTIONS method primarily do in a REST API?
Answer: Returns allowed methods for a resource
OPTIONS returns the HTTP methods that the server supports for the specified URL, commonly used in CORS preflight requests.
In REST, what does 'statelessness' mean?
Answer: Each request must contain all information needed to process it
Statelessness means the server does not store client session state; every request must be self-contained with all necessary context.
Which of the following best describes HATEOAS?
Answer: A constraint where API responses include links to related actions
HATEOAS (Hypermedia as the Engine of Application State) means responses include hypermedia links that guide clients to possible next actions.
What is the purpose of the 'ETag' HTTP header in REST APIs?
Answer: To enable conditional requests and caching validation
ETags are identifiers for a specific version of a resource, allowing clients to make conditional requests and avoid downloading unchanged content.
Which HTTP method should be used to partially update a resource in a REST API?
Answer: PATCH
PATCH is used for partial updates, sending only the fields that need to change, while PUT replaces the entire resource.
What does a 429 HTTP status code indicate?
Answer: The client has sent too many requests in a given time
429 Too Many Requests indicates that the client has exceeded the API's rate limit and should slow down its requests.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy