Explore Library
QuizAdvanced

Routing Attributes in Web API Controllers

Learn which attribute maps an HTTP GET request to a controller action in ASP.NET Core.

In an ASP.NET Core Web API controller decorated with [ApiController] and [Route("api/[controller]")], which attribute correctly maps a method to handle GET requests for a specific resource by id, e.g. GET /api/products/5?