Skip to main content

Data API Builder - Get a visual config UI

With the Data API builder, you can easily generate an API on top of an existing database. However typing out the configuration settings in the dab-config.json isn't much fun. The auto-entities features I talked about before can certainly help, but that is not always the right solution. With the integrated GUI in the MSSQL extension for Visual Studio Code, you can replace the manual JSON configuration with a visual interface that handles entity selection, CRUD permission mapping, API type targeting, and Docker-based local deployment — all without leaving the editor.

This post covers exactly what the UI does, what it generates, and where it falls short.

Entry points

The DAB configuration view is accessible from two places:

  • Object Explorer — right-click a database node → Build Data API (Preview)...
  • Schema DesignerDesign API button (top-right toolbar) or the Backend icon in the left panel

Both open the same configuration surface.

Entity selection

Tables are listed grouped by schema, with collapsible schema rows and a n/total badge showing how many entities in that schema are currently enabled.

  • Schema-level checkboxes support tri-state (all / none / mixed) and toggle all tables in the group
  • Per-entity rows expose: enable toggle, entity name, source table, per-action CRUD checkboxes, and an advanced settings gear
  • A filter input at the top searches across entity name, schema, and source table (case-insensitive); the enabled count badge updates live

Remark: the UI supports tables only at the moment. Views and stored procedures are not available in the designer.

Configuration

CRUD

CRUD permissions are set independently per entity via inline checkboxes (Create, Read, Update, Delete). Header-level checkboxes apply a given action across all enabled entities, also with tri-state support.

API Types

API type selection sits at the top of the view:

Option Output
REST REST endpoints + Swagger UI
GraphQL GraphQL endpoints + Nitro playground
MCP Model Context Protocol endpoints
All Toggles all three

At least one type must be selected before deploying.

Advanced Entity Settings

The gear icon on each entity row opens an Advanced Entity Configuration dialog:

Field Default Effect
Entity Name Table name Controls the name used in API routes and response payloads
Authorization Role Anonymous Toggle between Anonymous and Authenticated
Custom REST Path api/{entityName} Overrides the default REST route
Custom GraphQL Type Table name Overrides the default GraphQL type name

This maps directly to the entities block in the DAB JSON config — useful if you want clean API surface names that don't expose internal table naming conventions.



Configuration preview

The View Config button opens a Definition panel — a read-only render of the DAB JSON configuration that would be deployed. It:

  • Reflects entity selection, API types, CRUD permissions, and advanced settings in real time
  • Stays in sync bidirectionally with the UI and the Copilot chat interface
  • Scopes output to enabled entities only

Open in Editor promotes it to a full VS Code editor tab; Copy puts it on the clipboard. The generated file is standard DAB config format, so it's portable if you want to take it outside the extension.

Local deployment

Deployment runs DAB as a Docker container. 

The wizard runs sequentially:

  1. Prerequisites check — verifies Docker is installed, Docker Desktop is running, and the Docker engine is ready
  2. Container Settings — optional container name (autogenerated default provided) and port (default 5000); the connection string is pulled automatically from the active MSSQL connection
  3. Deployment — pulls the DAB image, starts the container, checks readiness

On success, the wizard surfaces endpoint URLs per API type:

API Type Endpoint In-editor action
REST http://localhost:{port}/api Opens Swagger UI in browser
GraphQL http://localhost:{port}/graphql Opens Nitro playground in Simple Browser
MCP http://localhost:{port}/mcp Writes MCP server config to .vscode/mcp.json

Authentication constraint: the Docker container only supports SQL authentication. Connections using Microsoft Entra interactive methods (ActiveDirectoryInteractive, etc.) are blocked — the container environment can't open a browser for the sign-in flow. The extension surfaces a notification if your active connection uses an unsupported auth type. SQL database in Microsoft Fabric is similarly unsupported, since Fabric requires Entra authentication exclusively.

GitHub Copilot integration

A Chat button in the toolbar opens a Copilot chat session scoped to the DAB configuration context.

 Natural language prompts update entity selection and permissions directly:

"Enable all SalesLT entities for read operations"
"Expose only the Customer and Product tables with full CRUD permissions"
"Set all entities in the dbo schema to read-only"
"Can you also enable MCP for the Data API builder API?"

State is fully bidirectional: Copilot changes propagate to the UI and Definition panel immediately, and UI changes are visible to Copilot in the same session. Requires the GitHub Copilot and GitHub Copilot Chat extensions to be installed and authenticated.

As with any AI-generated configuration, review the Definition panel output before deploying — the generated JSON is inspectable and portable.

What gets generated

The output is a standard DAB JSON configuration file. If you're already familiar with DAB config structure, the UI maps cleanly onto it: entity names, source tables, CRUD permissions, REST/GraphQL/MCP runtime sections, authorization roles, and custom path overrides all correspond directly to known config fields. Nothing proprietary is introduced — the file is fully portable and can be checked into source control or handed off to a deployment pipeline.

More information

DAB in VS Code with MSSQL — Microsoft Learn

DAB 2.0 Preview: Autoconfiguration with autoentities

Popular posts from this blog

Podman– Command execution failed with exit code 125

After updating WSL on one of the developer machines, Podman failed to work. When we took a look through Podman Desktop, we noticed that Podman had stopped running and returned the following error message: Error: Command execution failed with exit code 125 Here are the steps we tried to fix the issue: We started by running podman info to get some extra details on what could be wrong: >podman info OS: windows/amd64 provider: wsl version: 5.3.1 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:2655: connectex: No connection could be made because the target machine actively refused it. That makes sense as the podman VM was not running. Let’s check the VM: >podman machine list NAME         ...

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Cleaner switch expressions with pattern matching in C#

Ever find yourself mapping multiple string values to the same result? Being a C# developer for a long time, I sometimes forget that the C# has evolved so I still dare to chain case labels or reach for a dictionary. Of course with pattern matching this is no longer necessary. With pattern matching, you can express things inline, declaratively, and with zero repetition. A small example I was working on a small script that should invoke different actions depending on the environment. As our developers were using different variations for the same environment e.g.  "tst" alongside "test" , "prd" alongside "prod" .  We asked to streamline this a long time ago, but as these things happen, we still see variations in the wild. This brought me to the following code that is a perfect example for pattern matching: The or keyword here is a logical pattern combinator , not a boolean operator. It matches if either of the specified pattern...