Self-Assessment Quiz: API Ingestion

Twenty questions. Aim for 16 or more.


Question 1

Which is NOT one of the five ways an API is harder than a database?

  • A. You cannot see the schema
  • B. You are a guest with an enforced quota
  • C. The data volume is larger
  • D. Every request can fail independently

Question 2

Because every request can fail independently, retry handling is:

  • A. An edge case
  • B. The main loop
  • C. Optional at small scale
  • D. The orchestrator's responsibility

Question 3

Offset pagination on a collection receiving inserts:

  • A. Works correctly
  • B. Systematically loses rows at page boundaries and duplicates others
  • C. Only fails at very high volume
  • D. Fails only on deletes

Question 4

The one-parameter fix for offset pagination's loss is:

  • A. A larger page size
  • B. An ascending sort on an immutable key, plus a range filter
  • C. Retrying each page
  • D. Reducing concurrency

Question 5

Cursor pagination's failure mode is:

  • A. Duplicates
  • B. Cursor expiry on a long or paused extraction
  • C. Skew
  • D. It cannot be resumed

Question 6

Page-token pagination should terminate on:

  • A. An empty page
  • B. The token's absence
  • C. A fixed page count
  • D. A 404

Question 7

Which rate-limit signal is authoritative over your local token bucket?

  • A. Your configured requests-per-second
  • B. The server's X-RateLimit-Remaining header — other systems share your quota
  • C. The documentation
  • D. The observed latency

Question 8

A client that runs at full speed until throttled:

  • A. Maximizes throughput
  • B. Spends its life in backoff and may get blocked
  • C. Is the recommended approach
  • D. Is fine if it honors Retry-After

Question 9

For a backfill, the constraint is usually:

  • A. The data volume
  • B. The rate limit
  • C. Network bandwidth
  • D. Parsing speed

Question 10

Which mitigation for a slow backfill has the highest payoff?

  • A. Parallel requests
  • B. A larger page size, or an undocumented bulk endpoint
  • C. Compression
  • D. Caching

Question 11

An auth token should be refreshed:

  • A. Once at job start
  • B. On a 401
  • C. On a margin before expiry, thread-safely
  • D. At exactly the expiry time

Question 12

Eight concurrent workers each refreshing a token can produce seven invalid tokens because:

  • A. Rate limiting
  • B. Some providers revoke the previous token when a new one is issued
  • C. Clock skew
  • D. The refresh endpoint is not idempotent

Question 13

Jitter in exponential backoff:

  • A. Is a minor refinement
  • B. Prevents backoff from merely synchronizing the herd at a longer interval
  • C. Reduces total wait time
  • D. Is only needed above 100 clients

Question 14

Which is retryable?

  • A. 400
  • B. 403
  • C. 422
  • D. 429, after honoring Retry-After

Question 15

Retrying 401 repeatedly is harmful because:

  • A. It is slow
  • B. Several providers treat it as a brute-force attempt and block the account
  • C. It corrupts the token
  • D. It is not — 401 is retryable

Question 16

The client in §16.6 was blocked for 24 hours because it:

  • A. Exceeded the data volume limit
  • B. Retried 429 without honoring Retry-After
  • C. Used too many connections
  • D. Sent malformed requests

Question 17

Webhooks require a reconciliation path because:

  • A. They are slow
  • B. They are lossy in practice regardless of what the documentation promises
  • C. They cannot be authenticated
  • D. They deliver out of order

Question 18

At Kestrel, a 30-day re-fetch window caught what share of retroactive changes?

  • A. 71%
  • B. 95%
  • C. 99.6%
  • D. 100%

Question 19

The long tail of retroactive changes is best handled by:

  • A. A wider re-fetch window
  • B. A different mechanism — reconciliation against the provider's own aggregate
  • C. Content hashing alone
  • D. Accepting the loss

Question 20

In a contract test, a new field in the response should:

  • A. Fail the test
  • B. Log, not fail
  • C. Be added to the expected shape automatically
  • D. Trigger a page

Answer Key

1. C — §16.1. API volumes are usually smaller than database ones; the difficulty is elsewhere.

2. B — §16.1. At a 0.1% failure rate a 40,000-page extract has forty failures per run.

3. B — §16.2. And the duplicates are invisible because the write is idempotent, which removes the only symptom anyone would notice.

4. B — §16.2. Paginate over something that does not move — new records arrive past the region you have read.

5. B — §16.2. Record the last record id too, so you can restart from a filter.

6. B — §16.2. Some APIs return a final page with items and no token; others an empty page with one.

7. B — §16.3. Your local bucket does not know about the other systems in your company.

8. B — §16.3. And with some providers, blocked rather than throttled.

9. B — §16.3, 💸 callout. It decides whether a backfill is an afternoon or a weekend.

10. B — §16.3. 50 → 500 per page is a 10× reduction in requests, usually one parameter. Bulk endpoints are frequently undocumented — ask.

11. C — §16.4. Clock skew and round-trip time mean a token valid when checked can be expired when evaluated.

12. B — §16.4. And the cascade of 401s looks exactly like a credential problem.

13. B — §16.5. Full jitter — a uniform draw from zero to the exponential.

14. D — §16.6. 408, 429, 5xx, and network errors are retryable.

15. B — §16.6. It hammers an auth endpoint with credentials that will not work.

16. B — §16.6, 🏭 callout. Not throttled — blocked, requiring a support ticket.

17. B — §16.7. The standard pattern is webhooks for latency plus a periodic pull for completeness.

18. C — §16.8. 7 days catches 95%; 90 days costs thirteen times the requests for a further 0.38%.

19. B — §16.8, 📐 callout. Widening is expensive and never complete; a reconciliation catches the tail at constant cost.

20. B — §16.9. Chapter 13 §13.7's schema-drift taxonomy applied to an API, and it is what keeps the check from crying wolf on every provider release.


Topic map

Missed Reread
1, 2 §16.1 — five ways it is harder
3, 4, 5, 6 §16.2 — pagination
7, 8, 9, 10 §16.3 — rate limits
11, 12 §16.4 — authentication
13 §16.5 — backoff and jitter
14, 15, 16 §16.6 — which errors to retry
17 §16.7 — incremental extraction
18, 19 §16.8 — retroactive change
20 §16.9 — testing