data-api-builder
Copilot instructions1.5k starsChanged 5 months agoMITView on GitHub
Data API builder (DAB) is an open-source, no-code tool that creates secure, full-featured REST, GraphQL endpoints for databases. It's a CRUD data API engine that runs in a container—on Azure, any other cloud, or on-premises. It also supports creation of DML and Custom MCP tools to build a SQL MCP Server backed by a SQL database. DAB uses integration tests that require database instances with proper schemas. SQL-based tests: CosmosDB tests: Test Configuration: - Test database schemas are in src/Service.Tests/DatabaseSchema-<engine>.sql…
- Reads credentials
Trending
More talk lately.about the whole repository
Who's talking about Azure/data-api-builder
- Azure/static-web-apps“Database queries yield "InternalServerError"”GitHub · Dec 18, 2023 · 3 reactions
- @robrich.bsky.social“There's 3 "#SQL #MCP Servers" for #MSSQL: - Data only: github.com/Azure/data-a... - Developer: …”Bluesky · Dec 8, 2025 · 2 likes
- CommunityToolkit/Aspire“DAB health checks”GitHub · Oct 31, 2024 · 2 reactions
- Azure/static-web-apps“Add a "test connection" button in the Database Connection screen in Azure Portal”GitHub · Oct 16, 2023 · 2 reactions
- ivoarnet/family-butler-v2“Investigate Azure Static Web Apps → Azure SQL database connection”GitHub · Sep 23, 2026 · 1 reactions
The biggest 5 of 36 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 36
Talked about on GitHub, Hacker News and Bluesky (36 times).
On GitHub · 32
- Dec 18, 2023Database queries yield "InternalServerError" — Azure/static-web-apps3 reactions · 4 comments
- Oct 31, 2024DAB health checks — CommunityToolkit/Aspire2 reactions · 9 comments
- Oct 16, 2023Add a "test connection" button in the Database Connection screen in Azure Portal — Azure/static-web-apps2 reactions · 5 comments
- Sep 23, 2026Investigate Azure Static Web Apps → Azure SQL database connection — ivoarnet/family-butler-v21 reaction
- Mar 6, 2026MCP HTTP endpoint from Azure Data API Builder cannot connect (missing endpoint / SSE mismatch) — mudler/LocalAGI1 reaction
27 more on GitHub
- Nov 20, 2025Implement CosmosDB as a configuration provider for DAB — Karo-Data-Management-Limited/wellbeing-os-module-dab1 reaction
- Oct 5, 2026chore: weekly staleness findings -- 2026-40 — alloydwhitlock/do-not-track-cli0 reactions
- Sep 29, 2026Prove minimal same-process DAB hosting — gcapnias/dab-iis-yarp0 reactions · 3 comments
- Sep 3, 2026[Feature Request]: Lift the vector and JSON data type restrictions in the DAB experience (UI + GitHub Copilot) — microsoft/vscode-mssql0 reactions
- Aug 10, 2026Cant validate Shema from MS Data Api Builder. — json-everything/json-everything0 reactions · 3 comments
- Jun 6, 2026content(mcp): add Data API Builder MCP Tools — JSONbored/awesome-claude0 reactions · 3 comments
- May 1, 2026Redis backed Caching of Internal Embeddings — ajtiwari07/data-api-builder0 reactions
- Apr 10, 2026Discovery: 2026-04-10 — YamilAyma/enlaces-para-desarrolladores0 reactions · 1 comment
- Mar 20, 2026Combine data-api-builder, chat-with-your-data, and nlp-sql-in-a-box into a unified NL2SQL-ENGINE template — codes4humanity/NL2SQL-ENGINE0 reactions
- Mar 13, 2026[Feature Request]: Pre-deployment validation: block entity selection when table contains DAB-unsupported column data types — microsoft/vscode-mssql0 reactions
- Mar 13, 2026[Feature Request]: Pre-deployment validation: block container deployment when connection is not using SQL authentication — microsoft/vscode-mssql0 reactions
- Mar 11, 2026[Feature Request]: Proactively surface unsupported data type warnings in the entity list — microsoft/vscode-mssql0 reactions
- Nov 20, 2025Add CosmosDB as runtime configuration provider — Karo-Data-Management-Limited/wellbeing-os-module-dab0 reactions · 1 comment
- Nov 7, 2025New entry: Azure Data Api Builder (DAB) — dbohdan/automatic-api0 reactions
- Aug 8, 2025.Net: Bug: The content type `application/graphql-response+json` is not supported. — microsoft/semantic-kernel0 reactions · 4 comments
- May 20, 2025unrecoverable error - A concurrent update was performed on this collection and corrupted its state — ChilliCream/graphql-platform0 reactions · 5 comments
- Apr 30, 2025The getting started link does not work — Azure-Samples/data-api-builder0 reactions
- Mar 6, 2025Update reference-configuration.md — MicrosoftDocs/data-api-builder-docs0 reactions · 4 comments
- Dec 5, 2024**Doc-Enhancement: Connecting Azure SQL Database to Azure Static Web App (Astro)** — Azure/static-web-apps0 reactions
- Mar 4, 2024Custom SWA roles don't work in Data API builder — Azure/static-web-apps-cli0 reactions · 1 comment
- Mar 4, 2024Old Data API builder version used — Azure/static-web-apps-cli0 reactions · 7 comments
- Feb 11, 2024A valid connection string should be provided — Azure/static-web-apps0 reactions
- Dec 29, 2023Dead link on README.md — Azure-Samples/data-api-builder0 reactions · 1 comment
- Oct 15, 2023Set up deployment for Azure Static Web App + Azure Data Api Builder back-end — ArcadyRob/polar-dash0 reactions · 2 comments
- Jul 6, 2023Open API endpoint is missing when using the database generated API — Azure/static-web-apps0 reactions
- Jun 16, 2023Only the first 100 comments are shown for a PR — microsoft/vscode-pull-request-github0 reactions · 2 comments
- May 30, 2023Running swa locally on a arm64 with --data-api-location (CosmoDB connection) fails — Azure/static-web-apps-cli0 reactions · 1 comment
On Hacker News · 3
- Dec 5, 2024Data API builder: modern REST, GraphQL endpoints to Databases and on-prem stores1 point
- May 15, 2024Data API Builder for Azure Databases1 point
- Mar 19, 2024Data API Builder for Azure Databases1 point
On Bluesky · 1
- Dec 8, 2025There's 3 "#SQL #MCP Servers" for #MSSQL: - Data only: github.com/Azure/data-a... - Developer: learn.microsoft.com/en-us/sql/to... - A demo… — @robrich.bsky.social2 likes and reposts
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
25 rules. About 0 are common, 16 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 75
Test database schemas are in src/Service.Tests/DatabaseSchema-<engine>.sql
- Distinctive: line 83
Update connection string (use environment variables)
- Very specific: line 111
Type preferences: Use language keywords (int, string) over BCL types (Int32, String)
- Distinctive: line 112
Naming: Follow standard .NET naming conventions
- Very specific: line 113
this.qualifier: Not used unless necessary - Distinctive: line 116
When adding or modifying generated SQL queries in tests:
- Distinctive: line 117
PostgreSQL: Use https://sqlformat.org/ (remove unnecessary double quotes)
- Very specific: line 118
SQL Server: Use https://poorsql.com/ (enable "trailing commas", indent string: \s\s\s\s)
- Distinctive: line 119
MySQL: Use https://poorsql.com/ (same as SQL Server, max line width: 100)
- Distinctive: line 130
Add tests to the appropriate test class
- Distinctive: line 131
Use base class methods and helpers for engine operations
- Distinctive: line 133
Do not commit connection strings to the repository
- Distinctive: line 136
Create database using the appropriate server
- Very specific: line 137
Run the schema script: src/Service.Tests/DatabaseSchema-<engine>.sql
- Distinctive: line 139
Run tests for that specific database type
- Very specific: line 146
Use @env('variable_name') to reference environment variables
- Distinctive: line 147
Never commit connection strings or secrets
- Distinctive: line 150
Use the config-generators directory for automated config file creation:
- Very specific: line 159
Never commit secrets: Use environment variables with @env() syntax
- Very specific: line 160
Connection strings: Always use .env files (add to .gitignore)
- Distinctive: line 205
Follow the Microsoft Open Source Code of Conduct
- Distinctive: line 206
Use issue templates when reporting bugs or requesting features
- Very specific: line 208
Run dotnet format before committing
- Distinctive: line 209
Do not commit connection strings or other secrets
- Distinctive: line 213
All commits should be signed to receive the verified badge on GitHub.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Data API builder (DAB) - Copilot Instructions
Project Overview
Data API builder (DAB) is an open-source, no-code tool that creates secure, full-featured REST, GraphQL endpoints for databases. It's a CRUD data API engine that runs in a container—on Azure, any other cloud, or on-premises. It also supports creation of DML and Custom MCP tools to build a SQL MCP Server backed by a SQL database.
Key Technologies
- Language: C# / .NET
- .NET Version: .NET 10.0 (see
global.json) - Supported Databases: Azure SQL, SQL Server, SQLDW, Cosmos DB, PostgreSQL, MySQL
- API Types: REST, GraphQL, MCP
- Deployment: Cross-platform (Azure, AWS, GCP, on-premises)
Project Structure
data-api-builder/
├── src/
│ ├── Auth/ # Authentication logic
│ ├── Cli/ # Command-line interface (dab CLI)
│ ├── Cli.Tests/ # CLI tests
│ ├── Config/ # Configuration handling
│ ├── Core/ # Core engine components
│ ├── Service/ # Main DAB service/runtime
│ ├── Service.GraphQLBuilder/ # GraphQL schema builder
│ ├── Service.Tests/ # Integration tests
│ └── Azure.DataApiBuilder.sln # Main solution file
├── config-generators/ # Config file generation helpers
├── docs/ # Documentation
├── samples/ # Sample configurations and projects
├── schemas/ # JSON schemas for config validation
├── scripts/ # Build and utility scripts
└── templates/ # Project templatesBuilding and Testing
Prerequisites
- .NET 10.0 SDK or later
- Database server for testing (SQL Server, PostgreSQL, MySQL, or Cosmos DB)
Building the Project
# Build the entire solution
dotnet build src/Azure.DataApiBuilder.sln
# Clean and rebuild
dotnet clean src/Azure.DataApiBuilder.sln
dotnet build src/Azure.DataApiBuilder.slnRunning Tests
DAB uses integration tests that require database instances with proper schemas.
SQL-based tests:
# MsSql tests
dotnet test --filter "TestCategory=MsSql"
# PostgreSQL tests
dotnet test --filter "TestCategory=PostgreSql"
# MySQL tests
dotnet test --filter "TestCategory=MySql"CosmosDB tests:
dotnet test --filter "TestCategory=CosmosDb_NoSql"Test Configuration:
- Test database schemas are in
src/Service.Tests/DatabaseSchema-<engine>.sql - Config files are
src/Service.Tests/dab-config.<engine>.json - Connection strings should use
@env('variable_name')syntax - never commit connection strings
Running Locally
- Open the solution:
src/Azure.DataApiBuilder.sln - Copy a config file from
src/Service.Tests/dab-config.<engine>.jsontosrc/Service/ - Update connection string (use environment variables)
- Set
Azure.DataApiBuilder.Serviceas startup project - Select debug profile:
MsSql,PostgreSql,CosmosDb_NoSql, orMySql - Build and run
Code Style and Conventions
Formatting
- Tool:
dotnet format(enforced in CI) - Indentation: 4 spaces for C# code, 2 spaces for YAML/JSON
- Line endings: LF (Unix-style)
- Character encoding: UTF-8
- Trailing whitespace: Removed
- Final newline: Required
- Refer to
.\src\.editorconfigfor additional formatting conventions.
Running Code Formatter
# Format all files
dotnet format src/Azure.DataApiBuilder.sln
# Verify formatting (CI check)
dotnet format src/Azure.DataApiBuilder.sln --verify-no-changesC# Conventions
- Usings: Sort system directives first, no separation between groups
- Type preferences: Use language keywords (
int,string) over BCL types (Int32,String) - Naming: Follow standard .NET naming conventions
this.qualifier: Not used unless necessary
SQL Query Formatting
When adding or modifying generated SQL queries in tests:
- PostgreSQL: Use https://sqlformat.org/ (remove unnecessary double quotes)
- SQL Server: Use https://poorsql.com/ (enable "trailing commas", indent string:
\s\s\s\s) - MySQL: Use https://poorsql.com/ (same as SQL Server, max line width: 100)
Testing Guidelines
Test Organization
- Integration tests validate the engine's query generation and database operations
- Tests are organized by database type using TestCategory attributes
- Each database type has its own config file and schema
Adding New Tests
- Work within the existing database schema (SQL) or GraphQL schema (CosmosDB)
- Add tests to the appropriate test class
- Use base class methods and helpers for engine operations
- Format any generated SQL queries using the specified formatters
- Do not commit connection strings to the repository
Test Database Setup
- Create database using the appropriate server
- Run the schema script:
src/Service.Tests/DatabaseSchema-<engine>.sql - Set connection string in config using
@env()syntax - Run tests for that specific database type
Configuration Files
DAB Configuration
- Config files use JSON format with schema validation
- Schema files are in the
schemas/directory - Use
@env('variable_name')to reference environment variables - Never commit connection strings or secrets
Config Generation
Use the config-generators directory for automated config file creation:
# Build with config generation
dotnet build -p:generateConfigFileForDbType=<database_type>Supported types: mssql, postgresql, cosmosdb_nosql, mysql
Security Practices
- Never commit secrets: Use environment variables with
@env()syntax - Connection strings: Always use
.envfiles (add to.gitignore) - Authentication: Supports AppService, EasyAuth, StaticWebApps, JWT
- Authorization: Role-based permissions in config
- set-session-context: Available for SQL Server row-level security
API Development
REST API
- Base path:
/api(configurable) - Follows Microsoft REST API Guidelines
- Request body validation available
- Health endpoint:
/health - Swagger UI in development mode:
/{REST_PATH}/openapi(default:/api/openapi)
GraphQL API
- Base path:
/graphql(configurable) - Introspection enabled in development mode
- Nitro UI in development mode:
/graphql - Schema generated from database metadata
MCP Tools
- Base Path:
/mcp(configurable) - Discover tools with MCP Inspector
Common Commands
# Install DAB CLI globally
dotnet tool install microsoft.dataapibuilder -g
# Initialize a new config
dab init --database-type <type> --connection-string "@env('connection_string')" --host-mode development
# Add an entity to config
dab add <entity_name> --source <schema.table> --permissions "anonymous:*"
# Start DAB locally
dab start
# Validate a config file
dab validateContributing
- Sign the Contributor License Agreement (CLA)
- Follow the Microsoft Open Source Code of Conduct
- Use issue templates when reporting bugs or requesting features
- Include configuration files, logs, and hosting model in issue reports
- Run
dotnet formatbefore committing - Do not commit connection strings or other secrets
Commit Signing
All commits should be signed to receive the verified badge on GitHub. Configure GPG or SSH signing:
GPG Signing:
# Generate a GPG key
gpg --full-generate-key
# List keys and copy the key ID
gpg --list-secret-keys --keyid-format=long
# Configure Git to use the key
git config --global user.signingkey <KEY_ID>
git config --global commit.gpgsign true
# Add GPG key to GitHub account
gpg --armor --export <KEY_ID>SSH Signing:
# Generate an SSH key
ssh-keygen -t ed25519 -C "your_email@example.com"
# Configure Git to use SSH signing
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign true
# Add SSH key to GitHub account as signing keyReferences
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

