Skip to content
Back to search

data-api-builder

Data API builder provides modern REST, GraphQL endpoints and MCP tools to your Azure Databases and on-prem stores.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Azure/data-api-builder with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Azure/data-api-builder'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/azure--data-api-builder/badge.svg)](/listings/azure--data-api-builder)

HTML

<a href="/listings/azure--data-api-builder"><img src="/api/listings/azure--data-api-builder/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Use the [Getting Started](https://learn.microsoft.com/azure/data-api-builder/get-started/get-started-with-data-api-builder) tutorial to quickly explore the core tools and concepts.

1. Install the `dotnet` [command line](https://get.dot.net)

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 source control.

5. Create your initial configuration file

Data API builder (DAB) requires a JSON configuration file. Use `dab --help` for syntax options.

dab init
  --database-type mssql
  --connection-string "@env('my-connection-string')"
  --host-mode development

> [!NOTE] > Including `--host-mode development` enables Swagger for REST and Nitro for GraphQL.

Resulting configuration

The file `dab-config.json` is automatically created through this process. These are the resulting contents:

{
  "$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.5.56/dab.draft.schema.json",
  "data-source": {
    "database-type": "mssql",
    "connection-string": "@env('my-connection-string')",
    "options": {
      "set-session-context": false
    }
  },
  "runtime": {
    "rest": {
      "enabled": true,
      "path": "/api",
      "request-body-strict": true
    },
    "graphql": {
      "enabled": true,
      "path": "/graphql",
      "allow-introspection": true
    },
    "host": {
      "cors": {
        "origins": [],
        "allow-credentials": false
      },
      "authentication": {
        "provider": "AppService"
      },
      "mode": "development"
    }
  },
  "entities": { }
}

6. Add your table to the configuration

dab add Todo
  --source "dbo.Todo"
  --permissions "anonymous:*"

> [!NOTE] > DAB supports tables, views, and stored procedures. When the type is not specified, the default is `table`.

Resulting configuration

The `entities` section of the configuration is no longer empty:

{
  "entities": {
    "Todo": {
      "source": {
        "object": "dbo.Todo",
        "type": "table"
      },
      "graphql": {
        "enabled": true,
        "type": {
          "singular": "Todo",
          "plural": "Todos"
        }
      },
      "rest": {
        "enabled": true
      },
      "permissions": [
        {
          "role": "anonymous",
          "actions": [
            {
              "action": "*"
            }
          ]

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 315 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Data API builder for Azure Databases
  2. [![NuGet Package](https://img.shields.io/nuget/v/microsoft.dataapibuilder.svg?color=success)](https://www.nuget.org/packages/Microsoft.DataApiBuilder)
  3. [![Nuget Downloads](https://img.shields.io/nuget/dt/Microsoft.DataApiBuilder)](https://www.nuget.org/packages/Microsoft.DataApiBuilder)
  4. [![Documentation](https://img.shields.io/badge/docs-website-%23fc0)](https://learn.microsoft.com/azure/data-api-builder/)
  5. [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
  6. [What's new?](https://learn.microsoft.com/azure/data-api-builder/whats-new)
  7. ## Join the community
  8. Want to be part of our priorities and roadmap? Sign up [here](https://forms.office.com/pages/responsepage.aspx?id=v4j5cvGGr0GRqy180BHbR1S1JdzGAxhDrefV-tBYtwZUNE1RWVo0SUVMTkRESUZLMVVOS0wwUFNVRy4u).
  9. ![](docs/media/dab-logo.png)
  10. ## About Data API builder
  11. 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.
  12. > [!IMPORTANT]
  13. > Data API builder (DAB) is open source and always free.
  14. ### Which databases does Data API builder support?
  15. | | Azure SQL | SQL Server | SQLDW | Cosmos DB | PostgreSQL | MySQL |
  16. | :-----------: | :-------: | :--------: | :---: | :-------: | :--------: | :---: |
  17. | **Supported** | Yes | Yes | Yes | Yes | Yes | Yes |
  18. ### Which environments does Data API builder support?
  19. | | On-Prem | Azure | AWS | GCP | Other |
  20. | :-----------: | :-----: | :---: | :--: | :--: | :---: |
  21. | **Supported** | Yes | Yes | Yes | Yes | Yes |
  22. ### Which endpoints does Data API builder support?
  23. | | REST | GraphQL | MCP |
  24. | :-----------: | :--: | :-----: | :---------: |
  25. | **Supported** | Yes | Yes | Yes |
  26. ## Getting started
  27. Use the [Getting Started](https://learn.microsoft.com/azure/data-api-builder/get-started/get-started-with-data-api-builder) tutorial to quickly explore the core tools and concepts.
  28. ### 1. Install the `dotnet` [command line](https://get.dot.net)
  29. https://get.dot.net
  30. > [!NOTE]
  31. > You may already have .NET installed!
  32. The Data API builder (DAB) command line requires the .NET runtime version 8 or later.
  33. #### Validate your installation
  34. ```sh
  35. dotnet --version
  36. ```
  37. ### 2. Install the `dab` command line
  38. The Data API builder (DAB) command line is cross-platform and intended for local developer use.
  39. ```sh
  40. dotnet tool install microsoft.dataapibuilder -g
  41. ```
  42. #### Validate your installation
  43. ```sh
  44. dab --version
  45. ```
  46. ### 3. Create your database (example: Azure SQL database / T-SQL)
  47. This example uses a single table for simplicity.
  48. ```sql
  49. CREATE TABLE dbo.Todo
  50. (
  51. Id INT PRIMARY KEY IDENTITY,
  52. Title NVARCHAR(500) NOT NULL,
  53. IsCompleted BIT NOT NULL DEFAULT 0
  54. );
  55. INSERT dbo.Todo (Title, IsCompleted)
  56. VALUES
  57. ('Walk the dog', 0),
  58. ('Feed the fish', 0),
  59. ('Clean the cat', 1);
  60. ```
  61. ### 4. Prepare your connection string
  62. Data API builder (DAB) supports `.env` files for testing process-level environment variables.
  63. #### PowerShell (Windows)
  64. ```ps
  65. echo "my-connection-string=$env:database_connection_string" > .env
  66. ```
  67. #### cmd.exe (Windows)
  68. ```cmd
  69. echo my-connection-string=%database_connection_string% > .env
  70. ```
  71. #### bash (macOS/Linux)
  72. ```bash
  73. echo "my-connection-string=$database_connection_string" > .env
  74. ```
  75. #### Resulting .env file
  76. The file `.env` is automatically created through this process. These are the resulting contents:
  77. ```
  78. "my-connection-string=$env:database_connection_string"
  79. ```
  80. > [!NOTE]
  81. > Be sure and replace `database_connection_string` with your actual database connection string.
  82. > [!IMPORTANT]
  83. > Adding `.env` to your `.gitignore` file will help ensure your secrets are not added to source control.
  84. ### 5. Create your initial configuration file
  85. Data API builder (DAB) requires a JSON configuration file. Use `dab --help` for syntax options.
  86. ```sh
  87. dab init
  88. --database-type mssql
  89. --connection-string "@env('my-connection-string')"
  90. --host-mode development
  91. ```
  92. > [!NOTE]
  93. > Including `--host-mode development` enables Swagger for REST and Nitro for GraphQL.
  94. #### Resulting configuration
  95. The file `dab-config.json` is automatically created through this process. These are the resulting contents:
  96. ```json
  97. {
  98. "$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.5.56/dab.draft.schema.json",
  99. "data-source": {
  100. "database-type": "mssql",
  101. "connection-string": "@env('my-connection-string')",
  102. "options": {
  103. "set-session-context": false
  104. }
  105. },
  106. "runtime": {
  107. "rest": {
  108. "enabled": true,
  109. "path": "/api",
  110. "request-body-strict": true
  111. },
  112. "graphql": {
  113. "enabled": true,
  114. "path": "/graphql",
  115. "allow-introspection": true
  116. },
  117. "host": {
  118. "cors": {
  119. "origins": [],
  120. "allow-credentials": false
  121. },
  122. "authentication": {
  123. "provider": "AppService"
  124. },
  125. "mode": "development"
  126. }
  127. },
  128. "entities": { }
  129. }
  130. ```
  131. ### 6. Add your table to the configuration
  132. ```sh
  133. dab add Todo
  134. --source "dbo.Todo"
  135. --permissions "anonymous:*"
  136. ```
  137. > [!NOTE]
  138. > DAB supports tables, views, and stored procedures. When the type is not specified, the default is `table`.
  139. #### Resulting configuration
  140. The `entities` section of the configuration is no longer empty:
  141. ```json
  142. {
  143. "entities": {
  144. "Todo": {
  145. "source": {
  146. "object": "dbo.Todo",
  147. "type": "table"
  148. },
  149. "graphql": {
  150. "enabled": true,
  151. "type": {
  152. "singular": "Todo",
  153. "plural": "Todos"
  154. }
  155. },
  156. "rest": {
  157. "enabled": true
  158. },
  159. "permissions": [
  160. {
  161. "role": "anonymous",
  162. "actions": [
  163. {
  164. "action": "*"
  165. }
  166. ]
  167. }
  168. ]
  169. }
  170. }
  171. }
  172. ```
  173. ### 7. Run Data API builder
  174. In `production`, DAB runs in a container. In `development`, it’s locally self-hosted.
  175. ```sh
  176. dab start
  177. ```
  178. > [!IMPORTANT]
  179. > The DAB CLI assumes your configuration file is called `dab-config.json` and is in the local folder.
  180. ### 8. Access your data!
  181. By default, DAB enables both REST and GraphQL.
  182. ```sh
  183. GET http://localhost:5000/api/Todo
  184. ```
  185. > [!NOTE]
  186. > Change the URL to match your port if it is different.
  187. #### Other things you should try
  188. * DAB’s Health endpoint: `http://localhost:5000/health`
  189. * DAB’s Swagger UI: `http://localhost:5000/swagger`
  190. * DAB’s Nitro UI: `http://localhost:5000/graphql`
  191. ## How does it work?
  192. DAB dynamically creates endpoints and translates requests to SQL, returning JSON.
  193. ```mermaid
  194. sequenceDiagram
  195. actor Client as Client
  196. participant Endpoint as Endpoint
  197. participant QueryBuilder as QueryBuilder
  198. participant DB as Database
  199. %% Initialization / Warming up section (light grey)
  200. rect rgba(120,120,120,0.10)
  201. Endpoint -->>+ Endpoint: Read Config
  202. Endpoint ->> DB: Query Metadata
  203. DB -->> Endpoint: Metadata Response
  204. Endpoint ->>- Endpoint: Start Engine
  205. end
  206. %% Request/Response section (very light purple)
  207. rect rgba(180,150,255,0.11)
  208. Client ->>+ Endpoint: HTTP Request
  209. Endpoint ->> Endpoint: Authorize
  210. Endpoint ->> QueryBuilder: Invoke
  211. QueryBuilder -->> Endpoint: SQL Query
  212. Endpoint ->> DB: Submit Query
  213. DB -->> Endpoint: Data Response
  214. Endpoint -->>- Client: HTTP Response
  215. end
  216. ```
  217. ## Additional resources
  218. * [Online Documentation](https://aka.ms/dab/docs)
  219. * [Official Samples](https://aka.ms/dab/samples)
  220. * [Known Issues](https://learn.microsoft.com/azure/data-api-builder/known-issues)
  221. * [Feature Roadmap](https://github.com/Azure/data-api-builder/discussions/1377)
  222. #### References
  223. * [Microsoft REST API Guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md)
  224. * [Microsoft Azure REST API Guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md)
  225. * [GraphQL Specification](https://graphql.org/)
  226. ### How to contribute
  227. To contribute, see these documents:
  228. * [Code of Conduct](./CODE_OF_CONDUCT.md)
  229. * [Security](./SECURITY.md)
  230. * [Contributing](./CONTRIBUTING.md)
  231. * [MIT License](./LICENSE.txt)
  232. ### Third-party component notice
  233. Nitro (formerly Banana Cake Pop by ChilliCream, Inc.) may optionally store work in its cloud service via your ChilliCream account. Microsoft is not affiliated with or endorsing this service. Use at your discretion.
  234. ### Trademarks
  235. This project may use trademarks or logos. Use of Microsoft trademarks must follow Microsoft’s [Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks). Use of third-party marks is subject to their policies.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.