HomeTriviaTech & GamesREST API
concept🎮 Tech & Games

REST API Trivia Questions

How much do you really know about REST API? Below are 8 true or false statements. Click each one to reveal the answer and explanation.

1.

Using query parameters like /users?id=5 is more RESTful than /users/5.

Click to reveal answer ›

Easy
✗ FALSE

REST favors hierarchical resource paths; /users/5 is the standard identifier, while query parameters are for filtering collections.

2.

Statelessness in REST means the server never stores any session data between requests.

Click to reveal answer ›

Medium
✓ TRUE

Each request from client to server must contain all necessary info; server-side sessions violate the stateless constraint.

3.

Returning different representations of the same resource based on the Accept header is compliant with REST constraints.

Click to reveal answer ›

Medium
✓ TRUE

Content negotiation via Accept headers is a core REST constraint, allowing the same URI to serve different formats (e.g., JSON, XML) based on client preferences.

4.

Caching in REST APIs can reduce server load even when responses are dynamic.

Click to reveal answer ›

Medium
✓ TRUE

REST encourages explicit cache headers (e.g., ETag, Cache-Control) that allow clients and intermediaries to cache dynamic responses conditionally.

5.

REST APIs require JSON for all request and response bodies.

Click to reveal answer ›

Medium
✗ FALSE

REST is format-agnostic; it can use XML, plain text, HTML, or YAML. JSON is common but not mandatory.

6.

REST APIs must always use HTTP as the underlying protocol.

Click to reveal answer ›

Hard
✗ FALSE

REST is an architectural style, not tied to HTTP; it can be implemented over CoAP, gRPC, or other protocols, though HTTP is most common.

7.

Hypermedia links in API responses are optional in a true RESTful design.

Click to reveal answer ›

Hard
✗ FALSE

HATEOAS (hypermedia as the engine of application state) is a key REST constraint; without it, the API is merely HTTP RPC, not RESTful.

8.

Using the POST method for a safe and idempotent operation violates REST principles.

Click to reveal answer ›

Hard
✓ TRUE

POST is not safe or idempotent; safe, idempotent operations (like reading data) should use GET/HEAD. Using POST breaks the RESTful contract.

More in Tech & Games

MinecraftTrivia Questions →ChessTrivia Questions →TetrisTrivia Questions →Super MarioTrivia Questions →The Legend of ZeldaTrivia Questions →
View all Tech & Games topics →

Want to test yourself in real time?

Swipe right for True, left for False. New questions every day on PopBluff.

Play PopBluff Free →