API Fundamentals
Cheat sheet · https://pcornel.dk/topic.php?topic=5292
Answer
The core client/server contract of an API, including endpoint, resource, operation, representation and response semantics.
Remember
- API reachable ≠ API usable; the contract, authentication, authorization and resource semantics may still fail.
- HTTP success ≠ requested business outcome; asynchronous or validation behavior can defer the real result.
- Endpoint documented ≠ endpoint implemented exactly; deployed version and environment can drift from documentation.
- Machine-readable response ≠ trustworthy state; callers must validate schema, semantics and target-side effect.
First checks
curl -sS -i https://<api>/— basic request- API documentation/OpenAPI — reference
- Auth method — keys/tokens/OAuth
Verify in this order
request (method, URL, headers, body) → response (status, headers, body)
Where it usually breaks
A syntactically valid request and successful HTTP response prove only that the API interaction reached a defined response path; they do not independently prove the desired external state.
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
API Fundamentals API boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Caller / request | Environment/version, identity and exact request contract are attributable | Hidden defaults, wrong endpoint/version, leaked or mismatched credentials |
| Server / response | Status, headers, structured body and request ID are interpreted together | Status-only handling, ignored error body, ambiguous async result or unsafe retry |
| State / proof | Write result is reconciled with resource read-back or acceptance test | Response success treated as final target success without verification |
| Troubleshooting | First failed boundary is preserved, changed minimally and retested | Blind retries, credential rotation, replay or payload edits before evidence is captured |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5292