This quiz assesses in-depth understanding of HTTP and REST fundamentals, including status codes, idempotency, pagination mechanisms, and robust error handling strategies.
When a REST API successfully creates a new resource, which HTTP status code should it return to indicate resource creation, for example after a POST request to /items?
Which HTTP method is inherently designed to be idempotent, meaning that repeating the request multiple times yields the same result as making it once?
If a client tries to access a resource that does not exist on the server, such as GET /profiles/999, which HTTP status code is appropriate?
Which HTTP header is commonly used to provide clients with a URL to the next page in a paginated set of results when using cursor-based pagination?
Which HTTP method is considered 'safe', meaning it should not cause any state change on the server when used, for example, to retrieve information from /users?
According to REST best practices, what should the response body include when returning a 400 Bad Request status code due to invalid client input?
What does the 409 Conflict HTTP status code signify when returned by a REST API, such as after an update to a resource fails due to a version mismatch?
If a client repeatedly sends a DELETE request to /orders/1001 and the resource is already deleted, what status code should a properly designed REST API ideally return for the subsequent requests?
In RESTful APIs, which query parameters are commonly used to implement offset-based pagination, for example in GET /products?offset=20u0026limit=10?
When a PATCH request to /accounts/5 is missing required fields in its payload, which HTTP status code should the server use to indicate that the request was well-formed but semantically incorrect?