Missing APIs Terms — AI Knowledge Base (Gap Analysis)

Purpose: This document is an input for an AI generation pass. It lists the terms that are used in the existing 04-apis/ prose but never defined as their own term, plus the relationships each missing term has to other missing terms and to existing terms. Every row is pre-shaped to drop directly into the curriculum's 8-section term template (Prerequisites → Category → Environment → Explanation → Common Mistakes → Exercises → Related Terms → Key Takeaways).

Scope reviewed: 50 existing terms across terms/level_01terms/level_10, plus _meta/apis_terms_zero_to_hero.md and _meta/technology_context.md.

Method: (1) Verified cross-link integrity — no broken ../level_XX/*.md links exist, so "missing" here means conceptual gaps (a concept appears in prose/code but has no term file), not dangling references. (2) grep-counted how many existing files lean on each undefined concept, to prioritize by blast radius.


0. Two structural findings the generating AI must know first

  1. The Level 7 index no longer matches the files — RESOLVED by re-titling Level 7. _meta/apis_terms_zero_to_hero.md advertises Level 7 = "GraphQL Fundamentals" (GraphQL, Schema & Types, Queries, Mutations, Resolvers), but the actual terms/level_07/ files are a data-formats set: serialization.md, json_methods.md, xml.md, base64.md, graphql.md. Decision (adopted here): re-title Level 7 to "Data Formats & Serialization" so the index matches the files that already exist, and treat GraphQL as a single introductory term inside that level rather than a five-term sub-curriculum. The four GraphQL sub-terms (Schema & Types, Queries, Mutations, Resolvers) are therefore descoped — no longer counted as required gaps. They remain an optional future deep-dive, listed at the end of Section 2 for reference only.

    Exact index rewrite the generating AI must apply to _meta/apis_terms_zero_to_hero.md:

    ## Level 7: Data Formats & Serialization
    31. Serialization & Deserialization
    32. JSON Methods (parse / stringify)
    33. XML
    34. Base64 Encoding
    35. GraphQL (The REST Alternative)
    

    This maps 1:1 onto the five existing files and removes the contradiction.

  2. No missing_terms.md tracker exists in _meta/ (unlike 03-javascript). When these terms are generated, create _meta/missing_terms.md to record them, mirroring the JavaScript knowledge base's tracker convention.


1. Critical gaps — concepts used everywhere but never defined

These block comprehension the most because existing terms depend on them in prose/code.

Missing TermWhy it blocks learningEvidence (files referencing it)
Content-Type / MIME Typesapplication/json, Content-Type headers appear constantly, but the header's meaning is never taughthttp_headers, request_body, fetch, response_object, sse (5)
Same-Origin PolicyThe browser rule that CORS exists to relax — CORS can't be understood without itcors
Preflight Request (OPTIONS)The OPTIONS handshake CORS triggers; mentioned but undefinedcors, http_methods (2)
XMLHttpRequest / AJAXfetch.md defines itself as "the replacement for XHR" but XHR is never explainedfetch
Access Token vs Refresh TokenJWT/OAuth flows hinge on this pair; only "access token" is mentioned in passingjwt, oauth
Network Reliability: Timeout / Retry / Backofftechnology_context.md mandates handling these, yet no term covers themerror_handling, rate_limiting, idempotency

2. Missing terms by level

Each row: Proposed Term | description | Category | Prerequisites | Related. Categories follow the ones already used in this KB (Networking Protocol, Browser API / Networking, Data Format, Security, Architecture / Design, Real-Time, Tooling). 🆕 = brand-new concept.

Level 1 — Foundations of the Web (networking substrate under HTTP)

Per technology_context.md, keep these high-level mental models, not academic TCP/IP theory.

Proposed TermdescriptionCategoryPrerequisitesRelated
IP Address & Port [DONE]The numeric address + door number that locates a server on the networkNetworking ProtocolClient-Server ModelHTTP/HTTPS, DNS, URL/URI
DNS (Domain Name System) [DONE]The internet's phonebook: turns example.com into an IP addressNetworking ProtocolIP Address & PortURL/URI, HTTP/HTTPS
TCP/IP (high-level) [DONE]The reliable delivery layer HTTP rides on ("guaranteed, in-order packets")Networking ProtocolIP Address & PortHTTP/HTTPS, WebSockets
SSL/TLS & the Handshake [DONE]How HTTPS encrypts a connection before any data is sentSecurityHTTP/HTTPSCertificate, HTTPS
Latency & Bandwidth [DONE]Why the network is "slow": round-trip time vs throughputNetworking ProtocolClient-Server ModelCaching, Pagination

Level 2 — HTTP Anatomy

Proposed TermdescriptionCategoryPrerequisitesRelated
Content-Type & MIME Types [DONE]How sender declares payload format (application/json, text/html, multipart/form-data)Data FormatHTTP HeadersRequest Body, Serialization, JSON
Content Negotiation (Accept) [DONE]How client asks for a preferred response formatData FormatHTTP Headers, Content-Type & MIME TypesResponse Object, Versioning
URL Encoding (Percent-Encoding) [DONE]Escaping unsafe characters in query strings and pathsData FormatQuery Parameters, URL/URIRequest Body, Serialization
Idempotent vs Safe Methods [DONE]Which verbs are safe (GET) vs idempotent (PUT/DELETE) vs neither (POST)Networking ProtocolHTTP MethodsIdempotency, CRUD

Level 3 — RESTful APIs

Proposed TermdescriptionCategoryPrerequisitesRelated
Resource Naming & URI Design [DONE]Conventions for clean REST endpoints (/users/42/posts)Architecture / DesignEndpoints & Resources, RESTCRUD, Versioning
HATEOAS [DONE]Responses that embed links to next actions (REST maturity)Architecture / DesignREST, StatelessnessEndpoints & Resources
Richardson Maturity Model [DONE]The 0–3 scale that grades how "RESTful" an API really isArchitecture / DesignREST, HATEOASEndpoints & Resources

Level 4 — Security & Authentication

Proposed TermdescriptionCategoryPrerequisitesRelated
Same-Origin Policy [DONE]The default browser rule isolating one origin from anotherSecurityClient-Server Model, URL/URICORS, Preflight Request, CSRF
Preflight Request (OPTIONS) [DONE]The automatic OPTIONS probe the browser sends before a cross-origin callSecurityCORS, HTTP MethodsSame-Origin Policy, HTTP Headers
Access Token vs Refresh Token [DONE]Short-lived access token + long-lived refresh token patternSecurityJWT, OAuth 2.0Bearer Authentication, Session
OAuth Scopes [DONE]Fine-grained permissions granted to a token (read:user)SecurityOAuth 2.0JWT, API Keys
CSRF (Cross-Site Request Forgery) [DONE]Attack that rides a logged-in user's cookies; why tokens/SameSite existSecurityCookies, SessionCORS, Same-Origin Policy
XSS (Cross-Site Scripting) [DONE]Injected script stealing tokens; why you never store JWT carelesslySecurityJWT, CookiesWeb Storage, CSRF
Session vs Token Authentication [DONE]Stateful server sessions vs stateless tokens — the core auth trade-offSecurityStatelessness, JWT, CookiesAccess/Refresh Token
Secrets & Environment Variables [DONE]Keeping API keys out of source code (.env, secret managers)ToolingAPI KeysBasic & Bearer Auth

Level 5 — Fetching Data (Client-Side)

Proposed TermdescriptionCategoryPrerequisitesRelated
XMLHttpRequest / AJAX [DONE]The legacy request API fetch() replaced; explains fetch's "why"Browser API / NetworkingRequest & Response Lifecyclefetch, Promises
Request Timeout [DONE]Aborting a request that hangs too longBrowser API / Networkingfetch, PromisesAbortController, Retry & Backoff
AbortController / Cancellation [DONE]Canceling an in-flight fetchBrowser API / Networkingfetch, PromisesRequest Timeout
Retry & Exponential Backoff [DONE]Re-attempting failed calls with growing delaysBrowser API / NetworkingError Handling, Rate LimitingIdempotency, Request Timeout
Promise.all / Parallel Requests [DONE]Firing many requests concurrently and awaiting allBrowser API / NetworkingPromises, async/awaitfetch
FormData & Multipart Uploads [DONE]Sending files/binary instead of JSONData FormatRequest Body, fetchContent-Type & MIME Types
CORS Errors in the Browser [DONE]Reading and diagnosing a blocked cross-origin fetchBrowser API / NetworkingCORS, fetchPreflight Request, Same-Origin Policy

Level 6 — Advanced API Concepts

Proposed TermdescriptionCategoryPrerequisitesRelated
Idempotency Keys [DONE]Client-supplied key so a retried POST doesn't double-chargeArchitecture / DesignIdempotency, Retry & BackoffRate Limiting
Cache Invalidation [DONE]Knowing when cached data is stale (the "hard problem")Architecture / DesignCachingETag, Webhooks
Circuit Breaker [DONE]Failing fast when a downstream API is downArchitecture / DesignRetry & Backoff, Error HandlingRate Limiting
Bulk / Batch Requests [DONE]Combining many operations into one callArchitecture / DesignHTTP Methods, PaginationRate Limiting

Level 7 — Data Formats & Serialization (re-titled to match existing files)

Existing files: serialization.md, json_methods.md, xml.md, base64.md, graphql.md. The gaps below deepen the data-format theme this level actually teaches.

Proposed TermdescriptionCategoryPrerequisitesRelated
Deserialization / Parsing [DONE]Turning a wire string back into a live object (the inverse of serialization)Data FormatSerialization, JSON MethodsJSON, XML
Character Encoding (UTF-8) [DONE]How text becomes bytes, and why non-ASCII/emoji break naive payloadsData FormatSerializationBase64, JSON
Binary vs Text Formats [DONE]When to send bytes (protobuf, files) instead of text (JSON, XML)Data FormatSerialization, Base64Protocol Buffers, gRPC
Blob & ArrayBuffer [DONE]Handling binary response bodies in the browser (res.blob(), res.arrayBuffer())Browser API / NetworkingResponse Object, fetchFormData & Multipart Uploads, Binary vs Text Formats
Over-fetching vs Under-fetching [DONE]The REST pain points GraphQL was built to solveArchitecture / DesignREST, GraphQLPagination

Level 8 — Real-Time APIs

Proposed TermdescriptionCategoryPrerequisitesRelated
WebSocket Handshake (Upgrade) [DONE]The HTTP→WS Upgrade request that opens a socketReal-TimeWebSockets, HTTP HeadersTCP/IP, WebSocket API
Heartbeat / Ping-Pong [DONE]Keep-alive frames that detect a dead connectionReal-TimeWebSocketsReconnection
Reconnection & Backoff [DONE]Re-establishing a dropped real-time connectionReal-TimeWebSockets, Retry & BackoffHeartbeat
Pub/Sub & Channels [DONE]The messaging pattern behind rooms/topics in real-time appsReal-TimeWebSockets, Socket.ioWebhooks

Level 9 — Browser APIs (Storage & State)

Proposed TermdescriptionCategoryPrerequisitesRelated
Cookie Attributes (HttpOnly, Secure, SameSite) [DONE]The flags that make cookies safe for authSecurityCookiesCSRF, Session vs Token Auth
Storage Limits & Eviction [DONE]Quotas and when browsers purge cached/stored dataBrowser API / NetworkingWeb Storage, IndexedDB, Cache APIService Workers
Offline-First / PWA [DONE]Designing apps that work without a networkArchitecture / DesignService Workers, Cache APIIndexedDB
Storage Serialization [DONE]Why Web Storage only holds strings (JSON.stringify round-trip)Data FormatWeb Storage, SerializationJSON, JSON Methods

Level 10 — Designing & Tooling

Proposed TermdescriptionCategoryPrerequisitesRelated
API Contract / Schema-First Design [DONE]Agreeing the interface before writing codeArchitecture / DesignOpenAPI, RESTMocking, Versioning
Deprecation & Sunsetting [DONE]Retiring old API versions gracefullyArchitecture / DesignVersioningAPI Contract
API Gateway [DONE]The single entry point that routes/authenticates/rate-limitsArchitecture / DesignREST, Rate LimitingMicroservices, Load Balancer
Microservices vs Monolith [DONE]Why many small APIs vs one big oneArchitecture / DesignAPI, RESTAPI Gateway
Load Balancing [DONE]Spreading traffic across servers (and why statelessness enables it)Architecture / DesignStatelessnessAPI Gateway
SOAP & XML-RPC (legacy) [DONE]The pre-REST protocols still alive in enterpriseArchitecture / DesignXML, HTTP MethodsREST, gRPC
Protocol Buffers (protobuf) [DONE]The binary schema format that powers gRPCData FormatSerialization, gRPCBase64, JSON
SDK / Client Library [DONE]Language wrappers that hide raw HTTP from consumersToolingAPI, fetchOpenAPI, API Clients
DevTools Network Tab [DONE]Inspecting real requests/responses in the browserToolingRequest & Response Lifecycle, HTTP HeadersAPI Clients, Status Codes

Optional (descoped) — GraphQL sub-curriculum

Not required gaps. Because Level 7 is now "Data Formats & Serialization" (Section 0), GraphQL is a single term and these are an optional future deep-dive only. Generate them only if the curriculum owner later decides to expand GraphQL into its own dedicated level.

Proposed TermdescriptionCategoryPrerequisitesRelated
⏸️ GraphQL Schema & TypesThe typed contract defining what a GraphQL API exposesData FormatGraphQL, JSONQueries, Mutations, Resolvers
⏸️ GraphQL QueriesClient-authored read that asks for exactly the fields it needsData FormatGraphQL, Schema & TypesMutations, Resolvers
⏸️ GraphQL MutationsThe write operation (create/update/delete) in GraphQLData FormatGraphQL, Schema & TypesQueries, CRUD
⏸️ GraphQL ResolversServer-side functions that fetch the data for each fieldArchitecture / DesignGraphQL, Schema & TypesQueries, Mutations

3. Relationship map (dependency graph)

Notation: A → B means "A requires / builds on B". Bold = existing term; plain = missing.

Cluster 1 — Networking substrate (new foundation under Level 1)

HTTPS ───────→ SSL/TLS & Handshake ──→ Certificate
**HTTP/HTTPS** → TCP/IP (high-level) → IP Address & Port → DNS
**URL/URI** ──→ DNS
**WebSockets** → TCP/IP (high-level)

Cluster 2 — Data format & serialization (glue across the whole KB)

Content-Type & MIME Types → **HTTP Headers**
   ├─→ **Request Body**        (declares payload format)
   ├─→ **Response Object**     (reads it back)
   └─→ FormData & Multipart Uploads
Content Negotiation (Accept) → Content-Type & MIME Types
URL Encoding → **Query Parameters**
**Serialization** → **JSON** / **XML** / **Base64** / Protocol Buffers
Storage Serialization → **Web Storage** + **Serialization**

Cluster 3 — CORS & browser security (currently a floating island)

**CORS** → Same-Origin Policy → Client-Server Model
**CORS** → Preflight Request (OPTIONS) → **HTTP Methods**
CORS Errors in the Browser → **CORS** + **fetch**
CSRF → **Cookies** + Session vs Token Auth
XSS → **JWT** + **Web Storage**

Cluster 4 — Auth token lifecycle

**OAuth 2.0** → OAuth Scopes
**JWT** → Access Token vs Refresh Token → Session vs Token Auth
Session vs Token Auth → **Statelessness**
Cookie Attributes (HttpOnly/Secure/SameSite) → **Cookies** → CSRF
Secrets & Environment Variables → **API Keys**

Cluster 5 — Network reliability (mandated by technology_context.md)

Request Timeout → **fetch**
AbortController → **fetch**
Retry & Exponential Backoff → **Error Handling** + **Rate Limiting**
   └─→ Idempotency Keys → **Idempotency**
Circuit Breaker → Retry & Exponential Backoff
Promise.all / Parallel Requests → **Promises** + **async/await**

Cluster 6 — Data formats & serialization (re-titled Level 7)

**Serialization** → Deserialization / Parsing
**Serialization** → Character Encoding (UTF-8) → Base64
Binary vs Text Formats → **Base64** / Protocol Buffers
Blob & ArrayBuffer → **Response Object** + **fetch**
Over-fetching vs Under-fetching → **REST** (the problem **GraphQL** solves)
   (optional deep-dive) **GraphQL** → Schema & Types → Queries / Mutations → Resolvers

Cluster 7 — Real-time deepening

WebSocket Handshake (Upgrade) → **WebSockets** + **HTTP Headers**
Heartbeat / Ping-Pong → **WebSockets**
Reconnection & Backoff → **WebSockets** + Retry & Exponential Backoff
Pub/Sub & Channels → **Socket.io**

Cluster 8 — Architecture & tooling (Level 10 breadth)

API Gateway → **Rate Limiting** + Load Balancing
Microservices vs Monolith → API Gateway
Load Balancing → **Statelessness**
API Contract / Schema-First → **OpenAPI** → Mocking
Deprecation & Sunsetting → **Versioning**
Protocol Buffers → **gRPC** + **Serialization**
SDK / Client Library → **API** + **fetch**
SOAP & XML-RPC → **XML**

4. Suggested generation priority

TierRationaleTerms
P0 — Pervasive, blocks existing proseReferenced across many files but undefinedContent-Type & MIME Types · Same-Origin Policy · Preflight Request · XMLHttpRequest/AJAX · Access vs Refresh Token
P1 — Re-title Level 7 + close data-format gapsMake the index match the files (Section 0), then deepen the data-format themeRe-title index Level 7 → "Data Formats & Serialization" · Deserialization / Parsing · Character Encoding (UTF-8) · Binary vs Text Formats · Blob & ArrayBuffer · Over/Under-fetching
P2 — Reliability (mandated by tech context)"Network is unreliable" principleRequest Timeout · AbortController · Retry & Backoff · Idempotency Keys · Promise.all
P3 — Foundations & security depthRounds out mental modelsIP/Port · DNS · TCP/IP · SSL/TLS Handshake · CSRF · XSS · Session vs Token · Cookie Attributes · OAuth Scopes · Secrets/Env
P4 — Breadth & ecosystem literacyNice-to-have for "hero" levelAPI Gateway · Microservices · Load Balancing · SOAP · Protocol Buffers · SDK · DevTools Network Tab · HATEOAS · Richardson Maturity · Real-time deepening (Handshake/Heartbeat/Reconnection/PubSub) · PWA/Offline-first · Storage limits

5. Notes for the generating AI

  1. Follow the existing 8-section template exactly (see terms/level_05/fetch.md and terms/level_01/http_https.md): Prerequisites → Term Category → Environment Context → Explanation (Design Motivation / Reality Metaphor / Anatomy or Code Examples) → Common Mistakes & Pitfalls → Practice Exercises → Related Terms → Key Takeaways.
  2. Obey _meta/technology_context.md: Senior Full-Stack Architect persona; pragmatic, security-conscious tone; async/await + fetch over XMLHttpRequest; keep networking internals (TCP/IP, handshakes) at a high-level mental-model depth, not academic theory.
  3. Wire cross-links using the relative format ../level_XX/<file>.md, matching the Prerequisites/Related columns in Section 2. Every new term must be reachable from at least one existing term (add it to that term's Related section too).
  4. Re-title Level 7 first (decision already made — Section 0). Replace the Level 7 block in _meta/apis_terms_zero_to_hero.md with the "Data Formats & Serialization" heading and the five entries listed in Section 0, so the index matches the existing files. GraphQL stays a single term; do not generate the four GraphQL sub-terms (they are descoped/optional).
  5. Renumber consistently. Existing terms use # Term #N: headers. Decide whether new terms append after #50 or adopt level-relative numbering, and apply it uniformly.
  6. Create _meta/missing_terms.md (it does not yet exist here) and record each generated term, mirroring the tracker convention in knowledge-base/03-javascript/_meta/missing_terms.md.
  7. Environment tags must be one of the values already in use: Universal Web Standard, Client-Side (Browser), Node.js / Server-Side, or Both — pick per the term's reality (e.g. Same-Origin Policy = Browser; Load Balancing = Server; Content-Type = Universal).
Built with LogoFlowershow