Skills101
← All practice quizzes

Quiz: API Design

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

Design clean REST APIs the way interviewers expect — resources and verbs, the right status codes, cursor pagination that never repeats items, idempotency keys that stop double payments, and versioning.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Which HTTP method is NOT idempotent by default?

  2. Question 2

    A logged-in student tries to open an admin-only page. Which status code fits best?

  3. Question 3

    What does this print?

    items = [6, 5, 4, 3, 2, 1]
    page1 = items[0:2]
    items.insert(0, 7)
    page2 = items[2:4]
    print(page1, page2)
    
  4. Question 4

    Why is cursor pagination better than offset pagination for an infinite-scroll feed?

  5. Question 5

    The payment request succeeded but the response was lost, and the app retries with the same idempotency key. What should the server do?

🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →