| 1 | # Data API builder for Azure Databases |
| 2 | |
| 3 | [](https://www.nuget.org/packages/Microsoft.DataApiBuilder) |
| 4 | [](https://www.nuget.org/packages/Microsoft.DataApiBuilder) |
| 5 | [](https://learn.microsoft.com/azure/data-api-builder/) |
| 6 | [](https://opensource.org/licenses/MIT) |
| 7 | |
| 8 | [What's new?](https://learn.microsoft.com/azure/data-api-builder/whats-new) |
| 9 | |
| 10 | ## Join the community |
| 11 | |
| 12 | Want to be part of our priorities and roadmap? Sign up [here](https://forms.office.com/pages/responsepage.aspx?id=v4j5cvGGr0GRqy180BHbR1S1JdzGAxhDrefV-tBYtwZUNE1RWVo0SUVMTkRESUZLMVVOS0wwUFNVRy4u). |
| 13 | |
| 14 |  |
| 15 | |
| 16 | ## About Data API builder |
| 17 | |
| 18 | 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. |
| 19 | |
| 20 | > [!IMPORTANT] |
| 21 | > Data API builder (DAB) is open source and always free. |
| 22 | |
| 23 | ### Which databases does Data API builder support? |
| 24 | |
| 25 | | | Azure SQL | SQL Server | SQLDW | Cosmos DB | PostgreSQL | MySQL | |
| 26 | | :-----------: | :-------: | :--------: | :---: | :-------: | :--------: | :---: | |
| 27 | | **Supported** | Yes | Yes | Yes | Yes | Yes | Yes | |
| 28 | |
| 29 | ### Which environments does Data API builder support? |
| 30 | |
| 31 | | | On-Prem | Azure | AWS | GCP | Other | |
| 32 | | :-----------: | :-----: | :---: | :--: | :--: | :---: | |
| 33 | | **Supported** | Yes | Yes | Yes | Yes | Yes | |
| 34 | |
| 35 | ### Which endpoints does Data API builder support? |
| 36 | |
| 37 | | | REST | GraphQL | MCP | |
| 38 | | :-----------: | :--: | :-----: | :---------: | |
| 39 | | **Supported** | Yes | Yes | Yes | |
| 40 | |
| 41 | ## Getting started |
| 42 | |
| 43 | 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. |
| 44 | |
| 45 | ### 1. Install the `dotnet` [command line](https://get.dot.net) |
| 46 | |
| 47 | https://get.dot.net |
| 48 | |
| 49 | > [!NOTE] |
| 50 | > You may already have .NET installed! |
| 51 | |
| 52 | The Data API builder (DAB) command line requires the .NET runtime version 8 or later. |
| 53 | |
| 54 | #### Validate your installation |
| 55 | |
| 56 | ```sh |
| 57 | dotnet --version |
| 58 | ``` |
| 59 | |
| 60 | ### 2. Install the `dab` command line |
| 61 | |
| 62 | The Data API builder (DAB) command line is cross-platform and intended for local developer use. |
| 63 | |
| 64 | ```sh |
| 65 | dotnet tool install microsoft.dataapibuilder -g |
| 66 | ``` |
| 67 | |
| 68 | #### Validate your installation |
| 69 | |
| 70 | ```sh |
| 71 | dab --version |
| 72 | ``` |
| 73 | |
| 74 | ### 3. Create your database (example: Azure SQL database / T-SQL) |
| 75 | |
| 76 | This example uses a single table for simplicity. |
| 77 | |
| 78 | ```sql |
| 79 | CREATE TABLE dbo.Todo |
| 80 | ( |
| 81 | Id INT PRIMARY KEY IDENTITY, |
| 82 | Title NVARCHAR(500) NOT NULL, |
| 83 | IsCompleted BIT NOT NULL DEFAULT 0 |
| 84 | ); |
| 85 | INSERT dbo.Todo (Title, IsCompleted) |
| 86 | VALUES |
| 87 | ('Walk the dog', 0), |
| 88 | ('Feed the fish', 0), |
| 89 | ('Clean the cat', 1); |
| 90 | ``` |
| 91 | |
| 92 | ### 4. Prepare your connection string |
| 93 | |
| 94 | Data API builder (DAB) supports `.env` files for testing process-level environment variables. |
| 95 | |
| 96 | #### PowerShell (Windows) |
| 97 | |
| 98 | ```ps |
| 99 | echo "my-connection-string=$env:database_connection_string" > .env |
| 100 | ``` |
| 101 | |
| 102 | #### cmd.exe (Windows) |
| 103 | |
| 104 | ```cmd |
| 105 | echo my-connection-string=%database_connection_string% > .env |
| 106 | ``` |
| 107 | |
| 108 | #### bash (macOS/Linux) |
| 109 | |
| 110 | ```bash |
| 111 | echo "my-connection-string=$database_connection_string" > .env |
| 112 | ``` |
| 113 | |
| 114 | #### Resulting .env file |
| 115 | |
| 116 | The file `.env` is automatically created through this process. These are the resulting contents: |
| 117 | |
| 118 | ``` |
| 119 | "my-connection-string=$env:database_connection_string" |
| 120 | ``` |
| 121 | > [!NOTE] |
| 122 | > Be sure and replace `database_connection_string` with your actual database connection string. |
| 123 | |
| 124 | > [!IMPORTANT] |
| 125 | > Adding `.env` to your `.gitignore` file will help ensure your secrets are not added to |