Want to build a Web Application or API? Check SSW's Web Application / API consulting page.
REST is well established and most developers choose it by default when starting a new project. But now we have a choice and, depdending on your requirements, there may be a better option.
When consuming APIs in your applications, you need to make HTTP requests and handle responses. You have several options for generating API clients, ranging from manual implementation to automated code generation from OpenAPI specifications.
GraphQL is a query language for your APIs. It lets you expose a schema, which is a combination of types, queries, and mutations and your client applications can define their own queries based on that schema. You can think of it as SQL for the web.
GraphQL was developed by Facebook in 2012 to solve a problem with their mobile app, which was chewing users' data and battery and leading to negative reviews. This is because the Facebook newsfeed combines data from many entities and data sources, which required multiple API calls. GraphQL allowed them to retrieve all the data they need with 1 call.
Good error design is as important to the success of an API as the API design itself. A good error message provides context and visibility on how to troubleshoot and resolve issues at critical times.
The use of correct response codes is a simple yet crucial step towards building a better WebAPI. In ASP.NET Core, by default the WebAPI framework sets the response status code to 200 (OK), regardless of whether the task succeed or an error occurred.
You can save yourself countless hours of painful debugging , by specifying the correct response code.
Client-side validation provides a great user experience but this must always be backed up by server-side validation.
When your application needs real-time data updates, you have several options: polling, webhooks, or live connections. Polling - where clients repeatedly request data at intervals - is often the first solution developers reach for, but it's usually the worst choice for real-time scenarios.
Studies show that 98.5% of polling requests are wasted - they return no new data. This "Polling Madness" wastes server resources, increases costs, and still doesn't provide true real-time updates.
Calling a JSON API from .NET used to mean serializing to a string, wrapping it in StringContent, then reading the response back as a string and deserializing it. System.Net.Http.Json replaces all of that with one-line extension methods like PostAsJsonAsync and ReadFromJsonAsync.
The methods are easy to call, but also easy to call wrongly. The two common mistakes are overriding the serializer settings by accident and reading an error response as if it succeeded. Both fail quietly: the code compiles, the happy path works, and the bug only shows up in production when the other API rejects a request.
A connection drops after the server saves an order. The AI agent sees a timeout and tries again. Northwind now has two orders ready to ship for one request.
When you build write tools for agents, treat a timeout as an unknown outcome and make the retry safe. Accept an idempotency key, so a retry with the same key returns the original result within the documented window instead of writing again. Return an explicit outcome that tells the agent whether to continue, look up the record or stop. Without an idempotency key, the agent checks what happened before trying again; if it cannot establish the outcome, it stops and escalates.
An API starts with a handful of endpoints, and giving each one its own permission feels precise. A year later there are 300 endpoints, 300 permissions, a token stuffed with permission claims, and an admin who has to tick 40 boxes to let someone view and update teams. Nobody can say for sure what a group is allowed to do, and every new endpoint means another permission to create, assign and remember.
A user renames a hero and a spinner appears. Half a second later the list comes back. They rename the next hero and wait again. Across 20 heroes that's 20 waits for saves that almost always succeed, and the app feels slow even though the API is fine.
A webhook sends data to another organisation's URL. A mistyped URL or compromised receiver can expose the whole payload. An unsigned request also lets an attacker impersonate your service and trigger actions such as shipping an order.
When designing a webhook API, send a thin, signed notification containing IDs. The receiver verifies the raw request body before trusting it, then fetches details through an authenticated API. This limits disclosure and keeps access checks on the data read. Because senders retry, plan for duplicates and failed deliveries on both sides.