โ† All Web Development Flashcard Decks

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
  1. What is the main advantage of using JSON Web Tokens (JWT) over server-side sessions?

    Answer: JWTs are stateless and can be verified without a database lookup

    JWTs are self-contained tokens that encode claims, allowing servers to verify them without querying a session store, enabling stateless scalability.

  2. Which REST API design pattern uses a URL like '/users/{id}/orders' to represent relationships?

    Answer: Nested resource pattern

    Nested resources express parent-child relationships in the URL hierarchy, making it clear that orders belong to a specific user.

  3. What is the purpose of the 'X-Request-ID' header in API requests?

    Answer: To provide a unique identifier for tracing a request through distributed systems

    X-Request-ID (or Correlation-ID) is a unique identifier added to requests to enable end-to-end tracing across multiple services in a distributed system.

  4. What is 'API throttling' designed to prevent?

    Answer: A single client from monopolizing server resources with excessive requests

    API throttling limits the request rate per client to ensure fair resource distribution and protect the server from overload.

  5. In REST API design, what is the recommended way to handle soft deletes?

    Answer: Use PATCH to set a 'deleted_at' timestamp or 'status' field

    Soft deletes are typically handled with PATCH to mark a resource as deleted (e.g., setting deleted_at or is_deleted) without removing it from the database.

  6. What does 'API backward compatibility' mean in practice?

    Answer: Adding new features without breaking existing client integrations

    Backward compatibility means existing clients continue to work correctly after API updates, typically by only adding (not removing or renaming) fields and endpoints.

  7. Which of the following is a characteristic of a RESTful API's uniform interface?

    Answer: Resources are identified by URIs and manipulated through standard HTTP methods

    REST's uniform interface constraint requires that resources be identified via URIs and that standard HTTP methods (GET, POST, PUT, DELETE) define operations on them.

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