.NET Web APIs
So... What is an API?
You don’t need to know what an API is, only if you are a software developer. Maybe you are working in an environment with software developers and just want to understand what th...
Create and Run a Hello World, CRUD Web API
The time has come, let's build a simple "Hello, World!" REST Web API having dummy CRUD operations. We will investigate the differences between the available hosting model option...
ASP.NET Core Web API Fundamentals
Are you new to ASP.NET Core? Read this article to understand ASP.NET Core fundamentals, including the program structure, Dependency Injection (DI), the request pipeline, middlew...
Create ASP.NET Core Middlewares for Reusable and Modular Code
Do you want clean/thin API controllers, containing only the intended application code logic calls? Then it’s time to use middlewares, making your code reusable and modular. Cont...
Avoid Duplicating Code by Using ASP.NET Core Filters
Filter Attributes can be used to avoid code duplication in action methods and thus, follow the DRY principle. Probably, you have already used a filter and you don't know it. Let...
Creating and Testing ASP.NET Core Filter Attributes
Creating a Filter Attribute in ASP.NET Core may be confusing due to several implementation choices. We can make the necessary decisions by answering the right questions. Let's l...
CARE your Web APIs with Consistent and Structured Error Responses
Would you like your Web APIs to be maintainable, usable and predictable by providing consistent and structured error responses? Do you CARE about your API consumers? If yes, rea...
Idempotency for Fault-Tolerant Web APIs
Building a fault-tolerant Web API for distributed systems is challenging because of several distribution pitfalls (process failures, communication failures, etc.). However, Idem...
Designing a RESTful Web API
An API can provide flexibility in our source code, product, and teams. Let's see which key points we should consider when designing an API and how the REST constraints (principl...
REST Web API in Practice: Naming Endpoints, Filtering, Sorting, and Pagination
In computer science, naming things is hard! When designing and naming the URLs structure, various questions and possible conflicts between the team members may arise. Let's see ...
REST Web API in Practice: Improving towards Perfection
Designing REST Web APIs in practice has many challenges. However, our decisions can improve our Web APIs usability, extensibility, performance, etc. So let's see how Caching, HA...
All about Web API Versioning in ASP.NET Core
Web API Versioning is not just mapping a version to each controller or action. We should decide the used version mechanism(s) and how organize our controller actions and code fi...
Enriched Web API Documentation using Swagger/OpenAPI in ASP.NET Core
Keeping an up to date Web API documentation that provides all the necessary information (endpoints, data contracts, authorization, etc.) is challenging and requires time and eff...
Strategies to Handle Transient Faults in Web APIs
Transient faults are inevitable, especially in microservice and cloud-based Web APIs. So, let's learn about the strategies to reduce and handle transient failures to provide res...
Resilience APIs to Transient Faults using Polly
Transient fault handling may seem complicated, but libraries like Polly can simplify it. Let's learn how to use the Polly library in three simple steps. In addition, we will sim...
Enable HTTPS in .NET APIs with Manual Let's Encrypt
Our Web APIs may provide or receive sensitive data that can be accessed or altered without using a security protocol. So let's secure our Web APIs with a Free Let's Encrypt cert...