4 min read
What Is an API? (Definition With REST and ASP.NET Core Examples)
What is an API — definition, how REST APIs work, request/response flow, and a minimal ASP.NET Core example. Plain English before framework details.
Blog topic
What is an API, API design principles, REST resource naming, versioning, error envelopes, pagination, and auth — practical checklists for ASP.NET Core APIs consumed by Angular clients.
API design is the contract Angular, mobile, and partner clients depend on — URLs, status codes, ProblemDetails, versioning, and auth at the boundary. Start with what is an API, then API design principles.
If you search what is an API, API design, or API design principles, you want definitions and a checklist before framework tutorials. Start with what is an API, then API design principles for production REST contracts on ASP.NET Core.
API design is the contract your Angular SPA, mobile app, and partners depend on. It covers URLs, verbs, status codes, error envelopes, versioning, pagination, and auth — not just getting MapGet to return JSON.
Bad API design Good API design
──────────────── ────────────────
3 error shapes One ProblemDetails envelope
/getAllOrders GET /api/orders?page=1
200 + success:false 404 / 409 with correct codes
Unbounded lists Pagination + streaming exports
| Principle | ASP.NET Core habit |
|---|---|
| Resources as nouns | OrdersController, not GetOrdersController |
| Correct status codes | CreatedAtAction on POST |
| One validation envelope | API validation |
| Auth at boundary | JWT or BFF |
| Version before break | /api/v2/... or header strategy |
| Async I/O | async/await on SQL and HTTP |
Full checklist: API design principles.
| You are trying to… | Read |
|---|---|
| Learn what is an API | What is an API |
| Apply API design principles | API design principles |
| Standardize validation errors | API validation |
| Handle unhandled exceptions | Global exception handling |
| Build Minimal APIs | Minimal APIs |
| Connect Angular to .NET | Angular + .NET integration |
Related: Architecture · Auth & Tokens · Interview Questions
An Application Programming Interface — a contract for one program to request data or actions from another. Web APIs use HTTP, JSON, and status codes. Definition and example: what is an API.
Resource URLs (nouns), correct HTTP verbs, consistent ProblemDetails errors, pagination, versioning before breaking changes, auth at the boundary, and idempotent writes for payments. Checklist: API design principles.
One validation envelope, CORS with credentials if using cookies, stable JSON field names, and refresh-token flow that matches your interceptor. See API validation and Angular + .NET integration.
4 min read
What is an API — definition, how REST APIs work, request/response flow, and a minimal ASP.NET Core example. Plain English before framework details.
5 min read
API design principles for production REST APIs — resource naming, versioning, errors, pagination, auth, and idempotency with ASP.NET Core examples.
8 min read
ASP.NET Core API validation with ProblemDetails: FluentValidation without the deprecated AspNetCore package, one error envelope, and Angular form mapping.
Updated Published 6 min read
Set up ASP.NET Core global exception handling with ProblemDetails so Angular forms show consistent errors — middleware vs IExceptionHandler, 400 vs 500, and what not to leak.
Updated Published 5 min read
ASP.NET Core Minimal APIs guide — MapGet, MapGroup, DI, validation, OpenAPI, JWT auth, and when controllers still win for Angular-backed products.
Updated Published 8 min read
Angular and ASP.NET Core integration habits — DTO contracts, error envelopes, pagination metadata, datetime policy, and CORS decisions that stop frontend-backend rework.
Updated Published 5 min read
Fix System.Text.Json object cycle detected in ASP.NET Core — EF navigation graphs, why ReferenceHandler.Preserve breaks Angular, and DTO projection that actually ships.
Updated Published 8 min read
Production ASP.NET Core JWT authentication checklist — token lifetimes, refresh rotation, authorization policies, Angular client habits, and go-live security review.
7 min read
Backend-for-Frontend BFF pattern with ASP.NET Core, Angular, and YARP — cookie sessions, server-side tokens, CSRF defense, and when to skip SPA-held JWTs.
7 min read
Implement ASP.NET Core rate limiting middleware for Web APIs — fixed/sliding windows, per-user policies, 429 responses for Angular clients, and multi-instance pitfalls.