โ† All API Flashcard Decks

API Documentation and Design Flashcards

6 cards from real API practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 API Documentation and Design flashcards as text
  1. What is pagination in REST API design used for?

    Answer: Dividing large result sets into smaller, manageable pages

    Pagination splits large collections into pages, reducing response size, improving performance, and preventing overloading clients and servers.

  2. What is 'cursor-based pagination' in APIs?

    Answer: Using an opaque pointer to the next result set instead of page numbers

    Cursor-based pagination uses an opaque cursor pointing to a position in the result set, ensuring consistent paging even when data changes.

  3. What does the 'Accept-Version' header allow in API requests?

    Answer: Requesting a specific API version via headers

    The Accept-Version (or similar custom) header enables clients to request a specific API version without modifying the URL.

  4. What is hypermedia in the context of REST API responses?

    Answer: Links embedded in responses that guide clients to related resources and actions

    Hypermedia in REST responses means including links (URLs) to related resources and allowed actions, enabling self-documenting, navigable APIs.

  5. What is the purpose of an API rate limit response header like X-RateLimit-Remaining?

    Answer: To inform clients how many requests they have left in the current window

    X-RateLimit-Remaining tells clients how many requests remain before hitting the rate limit, enabling them to throttle themselves proactively.

  6. What is an 'idempotency key' used for in API design?

    Answer: Allowing clients to safely retry requests without duplicate side effects

    An idempotency key is a unique client-provided identifier that allows servers to recognize and safely ignore duplicate retried requests.