System Architecture
HttpDataServicesAPI is a standalone Windows Service (OWIN/Kestrel) that creates a direct bridge between the HTTP Protocol and the Microsoft SQL Server Database Engine.
Unlike traditional architectures that require Node.js, Python, or C# MVC middleware to "translate" data, HDS connects the wire directly to the data layer. This reduces latency, removes complexity, and allows the Database to act as the Application Server.
- Platform: .NET 8 Core (Cross-Platform Compatible)
- Database: SQL Server 2016 - 2022+ / Azure SQL
- Port: Defaults to 9000 (Configurable)
- No IIS Required: Runs as a self-hosted System Service.
The EXE_ Convention
HDS uses a strict naming convention to ensure security. By default, the API service ignores all objects in your database. It will only execute Stored Procedures that begin with the prefix EXE_.
This allows DBAs to explicitly "Publish" an endpoint simply by renaming a procedure.
-- Internal Procedure (Private)
CREATE PROCEDURE dbo.UpdateUserBalance ...
-- Public API Endpoint (Accessible via HTTP)
CREATE PROCEDURE dbo.EXE_UpdateUserBalance ...
Making Requests
The API listens for GET and POST requests. Parameters passed in the URL (GET) or Body (POST) are automatically mapped to the Stored Procedure's parameters.
HTTP GET
Execute a procedure by appending its name to the base URI.
GET https://api.node-01.net:9000/EXE_spListProcedures?Category=Finance
HTTP POST
For transactional data, send a JSON payload. The key names must match the SQL parameter names.
POST https://api.node-01.net:9000/HttpPost
Content-Type: application/json
{
"Name": "EXE_CreateTransaction",
"Amount": 500.00,
"Currency": "USD",
"Output": "JSON"
}
Security & Authentication
HDS supports Machine-to-Machine (mTLS) and Bearer Token authentication. However, the most powerful security layer is Logic-Based Auth.
Since the request is handled inside a Stored Procedure, you can perform complex validation (checking balances, verifying API keys in a table, logging audits) within the same ACID transaction as the execution.
Extended Procedures
We provide Python-based Stored Procedure to allow the Database to "talk back" to the web (Outbound HTTP).
COM_get_webrequest
Allows SQL Server to query other HDS nodes or 3rd party APIs.
EXEC dbo.COM_get_webrequest
@URL = 'https://external-api.com/price/btc',
@Response = @JsonOutput OUTPUT