Home / Servers

data-api-builder

by Azure

Data API builder for Azure Databases

NuGet Package Nuget Downloads Documentation License: MIT

What's new?

Join the community

Want to be part of our priorities and roadmap? Sign up here.

About Data API builder

Data API builder (DAB) is an open-source, no-code tool that creates secure, full-featured REST and GraphQL endpoints for your database. It’s a CRUD data API engine that runs in a container—on Azure, any other cloud, or on-premises. DAB is built for developers with integrated tooling, telemetry, and other productivity features.

[!IMPORTANT] Data API builder (DAB) is open source and always free.

Which databases does Data API builder support?

Azure SQLSQL ServerSQLDWCosmos DBPostgreSQLMySQL
SupportedYesYesYesYesYesYes

Which environments does Data API builder support?

On-PremAzureAWSGCPOther
SupportedYesYesYesYesYes

Which endpoints does Data API builder support?

RESTGraphQLMCP
SupportedYesYesYes

Getting started

Use the Getting Started tutorial to quickly explore the core tools and concepts.

1. Install the dotnet command line

https://get.dot.net

[!NOTE] You may already have .NET installed!

The Data API builder (DAB) command line requires the .NET runtime version 8 or later.

Validate your installation

dotnet --version

2. Install the dab command line

The Data API builder (DAB) command line is cross-platform and intended for local developer use.

dotnet tool install microsoft.dataapibuilder -g

Validate your installation

dab --version

3. Create your database (example: Azure SQL database / T-SQL)

This example uses a single table for simplicity.

CREATE TABLE dbo.Todo
(
    Id INT PRIMARY KEY IDENTITY,
    Title NVARCHAR(500) NOT NULL,
    IsCompleted BIT NOT NULL DEFAULT 0
);
INSERT dbo.Todo (Title, IsCompleted)
VALUES
    ('Walk the dog', 0),
    ('Feed the fish', 0),
    ('Clean the cat', 1);

4. Prepare your connection string

Data API builder (DAB) supports .env files for testing process-level environment variables.

PowerShell (Windows)

echo "my-connection-string=$env:database_connection_string" > .env

cmd.exe (Windows)

echo my-connection-string=%database_connection_string% > .env

bash (macOS/Linux)

echo "my-connection-string=$database_connection_string" > .env

Resulting .env file

The file .env is automatically created through this process. These are the resulting contents:

"my-connection-string=$env:database_connection_string" 

[!NOTE] Be sure and replace database_connection_string with your actual database connection string.

[!IMPORTANT] Adding .env to your .gitignore file will help ensure your secrets are not added to

apiazuredatabasegraphqlhacktoberfestmcpmcp-servermicrosoftrest