Skip to content
tezvyn:

API

114 bites tagged API — interview questions with model answers, and 60-second explainers.

Node.js & Express2 min read

CORS Middleware: Unlocking Cross-Origin Requests in Express

The `cors` middleware tells browsers which external websites can read your Express API's responses. Use it when a frontend on one domain needs to fetch data from your API on another.

Node.js & Express2 min read

WHATWG URL API: Safely Parse URLs, Not Strings

Treat URLs as structured objects, not messy strings. The WHATWG URL API parses a URL into components like protocol and path, just like JSON.parse. Use it for incoming requests or outgoing API calls. The footgun is using the legacy `url.parse()`.

Monitoring & SRE2 min read

Rate Limiting: Your API's Bouncer

Rate limiting acts as a bouncer for your API, controlling traffic to protect your service. It's used on public APIs to prevent abuse, ensure fair usage, and defend against denial-of-service attacks.

Monitoring & SRE2 min read

OpenTelemetry API: The Stable Interface for Your Code

The OpenTelemetry API provides stable interfaces for your code to generate telemetry. This lets you instrument your application once, while the SDK implementation handles the actual data processing and export, which can be swapped out later.

MLOps & Infrastructure2 min read

Model Signature: The API Contract for Your ML Model

A model signature is an API contract for your ML model, defining the exact shape and types of its inputs, outputs, and parameters. It's used by platforms like MLflow to validate requests and enable safe deployments. Forgetting it will block model registration.

LLMs & Generative AI2 min read

Amazon Bedrock: One API for Many AI Models

Amazon Bedrock is an API gateway for foundation models, letting you switch AI providers without rewriting code. It's used to build generative AI apps while avoiding vendor lock-in.

LLMs & Generative AI2 min read

MaaS: Renting AI Brains via API

Model-as-a-Service (MaaS) is like renting a pre-trained AI expert via an API. Instead of building and training your own models, you pay to use powerful, ready-made ones for tasks like text generation or image analysis.

LLMs & Generative AI2 min read

The OpenAI API: Access to Foundational AI Models

The OpenAI API provides access to influential models like GPT and DALL-E. It enables developers to integrate generative AI into commercial applications and research, building on technology that catalyzed the current AI boom.

Go & Rust2 min read

The FromRequest Trait: Consuming Request Bodies in Axum

Axum's `FromRequest` trait defines how to create a type by consuming an HTTP request body. It's the core of extractors like `Json<T>` that deserialize POST data. The footgun: you can only use one `FromRequest` extractor per handler, as it consumes the body.

Flutter & Dart2 min read

Dart's `http` Package: Simple Requests vs. Composable Clients

Dart's `http` package simplifies web requests. Use top-level functions like `http.get()` for one-off calls, or a `Client` for persistent connections. Forgetting to call `client.close()` is a common footgun that leaks resources.

Docker & Kubernetes2 min read

Kubernetes Gateway API: The Successor to Ingress

The Gateway API replaces Kubernetes Ingress with a role-oriented model, separating infrastructure from application routing. Use it when different teams need to manage their own traffic rules.

Docker & Kubernetes2 min read

kube-apiserver: The Front Door to Your Kubernetes Cluster

The kube-apiserver is the front door to your Kubernetes control plane. All requests to query or modify the cluster's state must pass through it, from `kubectl` commands to automated controller actions. The footgun is bypassing it to modify `etcd` directly.

Docker & Kubernetes2 min read

Kubernetes API Aggregation Layer: Extending the API Server

The API Aggregation Layer bolts custom API servers onto the main Kubernetes API, with `kube-apiserver` acting as a proxy. This powers features like the metrics server (`kubectl top`) and enables complex extensions.

Docker & Kubernetes2 min read

Custom Resource Definitions (CRDs): Teach Kubernetes New Tricks

CRDs let you define your own resource types, teaching Kubernetes new nouns like `Database` or `Backup`. This is how operators manage complex apps declaratively. The footgun is that a CRD only defines the API; you still need a controller to act on the objects.

Docker & Kubernetes2 min read

Kubernetes Events: The Cluster's Short-Term Memory

Think of Kubernetes Events as a cluster's temporary log, recording state changes like a Pod starting or a container failing. Use them with `kubectl describe` to debug issues in real-time.

Docker & Kubernetes2 min read

Kubernetes API Server Authorization Modules

Kubernetes API server authorization is like a chain of security guards. A request must get a "yes" from at least one configured module (like RBAC) to pass. This is fundamental to securing any cluster. The footgun is that the chain stops at the first "allow."

Docker & Kubernetes2 min read

K8s Authentication: Proving Who You Are to the API Server

The K8s API Server is a vault door; authentication is proving your identity to the guard. It tries a chain of methods—like OIDC for users or tokens for pods—until one succeeds. The footgun: unauthenticated requests become `system:anonymous`, a major risk.

Docker & Kubernetes2 min read

Kubernetes Admission Controllers: The API's Gatekeepers

Think of admission controllers as bouncers for your Kubernetes API. They intercept requests before objects are saved, enforcing custom policies like security rules or required labels. The footgun: a broken controller can block all changes to your cluster.

Design Systems2 min read

Figma's Library Analytics API: Quantify Your Design System's Impact

Figma's Library Analytics API lets you quantify your design system's impact by tracking component usage. Use it to find adoption trends or get a snapshot of where components are used. The footgun: data for files you can't access is obfuscated, not omitted.

Design Systems2 min read

Semantic Versioning: The MAJOR.MINOR.PATCH Contract

Semantic Versioning (MAJOR.MINOR.PATCH) is a contract that tells users if an update will break their code. It's used by package managers to safely resolve dependencies.

Design Systems2 min read

Semantic Versioning: A Contract for Your Code's Evolution

Semantic Versioning is a contract for your code. The MAJOR.MINOR.PATCH format signals if an update is a breaking change, a new feature, or a bug fix. It's vital for managing dependencies safely. The footgun: SemVer is meaningless without a defined public API.

Databases & Architecture2 min read

SQL Query Builders: Write SQL Without Writing SQL

An SQL query builder is a translator for your database, converting visual clicks or chained code methods into raw SQL. It's used to write safer, database-agnostic code or to let non-technical users build queries. The footgun is generating inefficient queries.

Databases & Architecture2 min read

ODBC: The Universal Translator for Databases

ODBC acts as a universal translator, letting one application speak to many different relational databases. Your app uses the standard ODBC interface, and a specific "driver" handles the unique protocol for each database. The footgun is performance overhead.

Databases & Architecture2 min read

JDBC: Java's Universal Translator for Databases

JDBC is Java's universal adapter for databases, letting your app speak SQL to any database via a standard API. It's used for connecting, querying, and managing transactions. The biggest footgun is building SQL strings directly; always use PreparedStatements.

Get API bites daily.

Five a day, five minutes, offline. With quizzes so it sticks.

Open testing — you’ll join as an early tester.