REST APIs skill check
Test your REST API design: methods and status codes, idempotency, caching, authentication, versioning, and pagination.
15
Questions
11 min
Timer can't pause
Multiple choice
HTTP/1.1 and HTTP/2
Choose a level
Topics
- HTTP methods
- Status codes
- Resource design
- Idempotency
- Caching
- Authentication
- Versioning
- Pagination and errors
Do
Use scratch paper or a notepad to work things out. Skip a question and come back to it later.
Don't
Look up answers during the check. Open the check in more than one tab or window.
Easy · 15 questions · 11 min
By starting, you agree to the Terms and Privacy Policy.
Practice checks each answer as you go, with an explanation. The exam is checked when you submit; 9 of 15 passes and earns a certificate.
Checking your levels…
Certificates come from the certified exam: pass with 9 of 15 while signed in. View a sample certificate.
Sample REST APIs questions with answers
These are never used in a check, so seeing their answers here won't give anything away.
Question 1 · Easy · HTTP methods
An API client needs to update only the email field of an existing user resource, leaving all other user fields untouched. Which HTTP method is specifically intended by RFC specifications for this partial update?- A.PATCH
- B.POST
- C.UPDATE
- D.PUT
Show answer
A. PATCH
PATCH is standardized in RFC 5789 specifically for applying partial modifications to a resource. PUT is defined to replace the target resource entirely with the request payload.Question 2 · Easy · Idempotency
In the context of HTTP semantics in RESTful services, what does it mean for a request method to be considered 'idempotent'?- A.The request can be safely retried only if the preceding request returned a 5xx server error.
- B.The request does not modify any state on the server regardless of how many times it is executed.
- C.Making multiple identical requests produces the same intended effect on the server state as making a single request.
- D.The server returns the exact same HTTP response headers and body every time the request is received.
Show answer
C. Making multiple identical requests produces the same intended effect on the server state as making a single request.
An HTTP method is idempotent if the side effects on the server of multiple identical requests are the same as for a single request. Methods like PUT and DELETE are idempotent, whereas POST is typically not.Question 3 · Moderate · Caching
A client receives a response with the header Cache-Control: no-cache. How should intermediate proxies and clients handle this cached entry for subsequent requests?- A.They must not store the response anywhere in memory or on disk
- B.They may store the response, but must revalidate it with the origin server before reuse
- C.They can serve the response directly without revalidation until max-age expires
- D.They must forward the request only to authenticated upstream proxies
Show answer
B. They may store the response, but must revalidate it with the origin server before reuse
"no-cache" allows caches to store the response, but mandates that they validate freshness with the origin server (using ETag or If-Modified-Since) before serving it to clients. "no-store" is the directive that prevents storage altogether.Question 4 · Advanced · Status codes
A client sends an update using conditional headers (If-Match: "etag-v1"). The resource has since been modified and its current tag is"etag-v2". What status code must the server return?- A.304 Not Modified
- B.409 Conflict
- C.412 Precondition Failed
- D.428 Precondition Required
Show answer
C. 412 Precondition Failed
Per RFC 9110, when a client provides an If-Match header and the condition evaluates to false on an unsafe method, the origin server MUST return a 412 Precondition Failed status code.
How scoring and certificates work
- Each check has 15 multiple-choice questions with one correct answer, and one timer for the whole check. A question you leave unanswered scores nothing.
- Practice is free without an account and shows whether each answer is right as you go, with an explanation.
- The certified exam is scored when you submit. 60% passes, which is 9 of 15. Easy unlocks Moderate, and Moderate unlocks Advanced.
- Passing the exam while signed in earns a free certificate, valid for one year, with its own verification page. See a sample certificate.
Free tools for REST APIs: HTTP Status Codes, cURL to Fetch, JWT Decoder, URL Encoder / Decoder