Skip to content

API Testing Textbook

A free, self-paced textbook in 7 chapters. Read a chapter, then drill it with the 160 companion flashcards using spaced repetition.

7 chapters · 160 cards · Updated

Chapters

  1. 1Foundations of API Testing

    API testing is the practice of verifying that an application's interfaces behave correctly across functionality, contracts, performance, security, and error handling. It is valuabl...

  2. 2HTTP Status Codes and Communication

    HTTP status codes are the primary vocabulary an API uses to tell clients what happened. The 4xx class signals client errors: the caller did something wrong and must adjust. Within...

  3. 3HTTP Methods, Headers, and Request Formats

    An HTTP method is safe if it is intended to be read-only and must not cause side effects: GET and HEAD are the canonical examples. RFC 7231 defines GET, HEAD, PUT, DELETE, and (pra...

  4. 4Authentication, Authorization, and Browser Concerns

    Authentication answers "who are you?" while authorization answers "what are you allowed to do?" In practice, an Authorization header such as Bearer <token> proves identity; t...

  5. 5API Architectural Styles and Security

    REST is an architectural style organized around resources identified by URIs, with a uniform interface, stateless requests, and representations (typically JSON) transferred over HT...

  6. 6Contract Testing, Mocks, and Test Patterns

    In microservice systems, contract testing verifies that a provider service's API still matches the expectations of its consumers—request and response shapes, status codes, and head...

  7. 7Performance, Observability, and Operations

    Beyond correctness, APIs must remain fast, reliable, and observable under load. Load testing measures behavior under expected and peak load to confirm latency, throughput, and erro...

← Back to the API Testing deck