Advanced REST APIs test (Advanced)
40 questions · 40 minutes · Free
Gateways, rate limiting, caching, webhooks and API contracts at scale.
Take the Advanced REST APIs test
What it covers
- API gateways and rate limiting
- Caching with ETags
- Webhooks and async APIs
- Error contracts and problem details
- REST vs gRPC vs GraphQL
Interview format
- Questions: 40 questions — 24 multiple choice, 12 multi-answer, 4 predict-the-output
- Time: 40 minutes, timed from the first question
- Difficulty: Advanced
- Skill area: Backend
- Price: Free
Earn a certificate
The Advanced REST APIs test is one of the 8 tests of the Backend Developer: Advanced learning path. Pass it and the other 7 tests at 70% or more and readyforhires issues you a verifiable certificate in your name, with its own code and verify link to share or add to LinkedIn.
Sample questions
5 sample questions from the Advanced REST APIs test, with the answers. Samples are taken out of the live test, so you will not meet these when you sit it.
Which of the following is a key component used in HTTP to enable conditional requests and caching by allowing the server to validate if the cached response is still valid?
- Webhook payload signing
- Cache invalidation patterns
- Rate limiting algorithms
- ETag cache control headers
Answer: D. ETag cache control headers
ETag cache control headers are used in HTTP to enable conditional requests and caching mechanisms. They provide a way for the server to validate if the cached response is still valid, reducing unnecessary data transfers. Other options are either unrelated to caching (e.g., rate limiting algorithms) or are not specific to ETag-based caching (e.g., cache invalidation patterns).
Which of the following is the correct RESTful URL to retrieve order #456 for user #123?
- POST /orders/456/user/123
- GET /orders/456/users/123
- GET /users/123/orders/456
- PUT /users/123/orders/456
Answer: C. GET /users/123/orders/456
In RESTful design, resources are nested to reflect their relationships. The correct URL for retrieving an order associated with a specific user is 'GET /users/123/orders/456', as it clearly indicates that order 456 belongs to user 123. Other options violate REST principles by either misrepresenting the relationship between resources or using incorrect HTTP methods.
Which HTTP header is primarily used to support conditional requests in caching mechanisms, allowing clients to validate cached responses against the server?
- ETag cache control headers
- Rate limiting algorithms
- Async API idempotency tokens
- RESTful hypermedia controls
Answer: A. ETag cache control headers
ETag cache control headers are used to validate cached responses and determine if the cached content is still valid on the server. They enable conditional requests, which help reduce unnecessary data transfer over the network. The other options are either unrelated to caching or pertain to different aspects of API design.
Which of the following statements accurately describes how gRPC supports request compression?
- gRPC uses HTTP/1.1 for request compression and does not support HTTP/2.
- gRPC supports request compression using gzip or deflate by default, which is negotiated via the HTTP/2 content-encoding header.
- gRPC relies on Protobuf to handle request compression automatically.
- gRPC uses JSON for request compression and does not support gzip or deflate.
Answer: B. gRPC supports request compression using gzip or deflate by default, which is negotiated via the HTTP/2 content-encoding header.
gRPC uses HTTP/2 under the hood, which supports compression via the content-encoding header. This allows clients and servers to negotiate compression algorithms like gzip or deflate. Other options are incorrect because gRPC does not rely on Protobuf for compression, it does not use HTTP/1.1, and it does not use JSON for compression.
Which HTTP header is used to enable conditional requests and caching by allowing the server to determine if a cached resource is still valid?
- Caching conditional requests
- ETag versioning strategies
- ETag cache control headers
- Caching stale-while-revalidate
Answer: C. ETag cache control headers
ETag cache control headers are used in HTTP to enable conditional requests and caching. They allow the server to determine if a cached resource is still valid by comparing the ETag value sent by the client with the one stored on the server. This helps reduce unnecessary data transfer and improves performance.
Frequently asked questions
- How many questions are in the Advanced REST APIs test?
- 40 questions (24 multiple choice, 12 multi-answer, 4 predict-the-output), with 40 minutes to answer them.
- What does the Advanced REST APIs test cover?
- API gateways and rate limiting, Caching with ETags, Webhooks and async APIs, Error contracts and problem details, REST vs gRPC vs GraphQL.
- Is the Advanced REST APIs test free?
- Yes. It is free to take with a readyforhires account.
- What level is the Advanced REST APIs test?
- Advanced, in Backend.