# Creating an API Controller

An API controller derives from ControllerBase, is marked \[ApiController\], and gets its address from \[Route\]. It asks for its DAO through an interface registered in Program.cs, and its actions return data that ASP.NET Core sends as JSON.

![Cheat sheet: Creating an API Controller](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/d2039afb98834c8bab1b244b4de91f32.webp)

- Category: ASP.NET Core
- Level: Journeyman
- Tags: \[ApiController\], aspnet-core, Controller, OpenAPI (rest-api), rest-api
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/web-apis-with-controllers-creating-an-api-controller-cheat-sheet
