CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 13.0.0

Prefix Reserved
dotnet add package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder --version 13.0.0
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder -Version 13.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder" Version="13.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder" Version="13.0.0" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder --version 13.0.0
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder, 13.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder@13.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder&version=13.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder&version=13.0.0
                    
Install as a Cake Tool

CommunityToolkit.Hosting.Azure.DataApiBuilder

Overview

This .NET Aspire Integration runs Data API builder in a container. Data API builder generates secure, feature-rich REST and GraphQL endpoints for Tables, Views and Stored Procedures performing CRUD (Create, Read, Update, Delete, Execute) operations against Azure SQL Database, SQL Server, PostgreSQL, MySQL and Azure CosmosDB.

Usage

Example 1: Single data source

var builder = DistributedApplication.CreateBuilder(args);

var sqlDatabase = builder
    .AddSqlServer("your-server-name")
    .AddDatabase("your-database-name");

var dab = builder.AddDataAPIBuilder("dab")
    .WithReference(sqlDatabase)
    .WaitFor(sqlDatabase);

var app = builder
    .AddProject<Projects.Client>()
    .WithReference(dab);

builder.Build().Run();

Example 2: Multiple data sources

var builder = DistributedApplication.CreateBuilder(args);

var sqlDatabase1 = builder
    .AddSqlServer("your-server-name")
    .AddDatabase("your-database-name");

var sqlDatabase2 = builder
    .AddSqlServer("your-server-name")
    .AddDatabase("your-database-name");

var dab = builder.AddDataAPIBuilder("dab", 
        "./dab-config-1.json", 
        "./dab-config-2.json")
    .WithReference(sqlDatabase1)
    .WithReference(sqlDatabase2)
    .WaitFor(sqlDatabase1)
    .WaitFor(sqlDatabase2);

var app = builder
    .AddProject<Projects.Client>()
    .WithReference(dab);

builder.Build().Run();

Note: All files are mounted/copied to the same /App folder.

Example 3: Cosmos DB and a schema file

var builder = DistributedApplication.CreateBuilder(args);

var cosmosdb = builder
    .AddAzureCosmosDB("myNewCosmosAccountName")
    .AddDatabase("myCosmosDatabaseName");

var dab = builder.AddDataAPIBuilder("dab",
        "./dab-config.json",
        "./schema.graphql")
    .WithReference(cosmosdb)
    .WaitFor(cosmosdb);

var app = builder
    .AddProject<Projects.Client>()
    .WithReference(dab);

builder.Build().Run();

Example 4: Connection string-only

var builder = DistributedApplication.CreateBuilder(args);

var sqlDatabase = builder
    .AddConnectionString("your-cs-name");

var dab = builder.AddDataAPIBuilder("dab")
    .WithReference(sqlDatabase);

var app = builder
    .AddProject<Projects.Client>()
    .WithReference(dab);

builder.Build().Run();

Configuration

  • name - The name of the resource.
  • port - The optional port number for the Data API builder container. Defaults to random.
  • configFilePaths - Opiotnal paths to the config/schema file(s) for Data API builder. Default is ./dab-config.json.

Data API builder Container Image Configuration

You can specify custom registry/image/tag values by using the WithImageRegistry/WithImage/WithImageTag methods:

var dab = builder.AddDataAPIBuilder("dab")
    .WithImageRegistry("mcr.microsoft.com")
    .WithImage("azure-databases/data-api-builder")
    .WithImageTag("latest");

OpenTelemetry Instrumentation

The Data API builder integration automatically configures OpenTelemetry (OTEL) instrumentation for distributed tracing and metrics. The integration uses the standard .WithOtlpExporter() method which sets up the necessary OTEL environment variables that Data API builder automatically recognizes.

To enable OTEL telemetry in Data API builder, add the following configuration to your dab-config.json file:

{
  "runtime": {
    "telemetry": {
      "open-telemetry": {
        "enabled": true,
        "service-name": "@env('OTEL_SERVICE_NAME')",
        "endpoint": "@env('OTEL_EXPORTER_OTLP_ENDPOINT')",
        "exporter-protocol": "grpc",
        "headers": "@env('OTEL_EXPORTER_OTLP_HEADERS')"
      }
    }
  }
}

The configuration includes the following settings:

  • enabled: Enables/disables OTEL telemetry (default: false)
  • service-name: Logical name for the service in traces. Uses the @env('OTEL_SERVICE_NAME') syntax to reference the environment variable automatically set by Aspire
  • endpoint: OTEL collector endpoint URL. Uses @env('OTEL_EXPORTER_OTLP_ENDPOINT') to reference the Aspire-provided endpoint
  • exporter-protocol: Protocol for exporting telemetry. Set to grpc for efficient binary transport
  • headers: Custom headers for OTEL export. Uses @env('OTEL_EXPORTER_OTLP_HEADERS') to reference Aspire-provided headers

With this configuration, Data API builder will:

  • Export traces and metrics to the Aspire dashboard via OTLP (OpenTelemetry Protocol)
  • Automatically use the OTEL endpoint provided by the Aspire app host
  • Include telemetry for REST and GraphQL operations, database queries, and system metrics

For more information about Data API builder telemetry, see the official documentation.

Known Issues

The current imlpementation of the Data API builder .NET Aspire integration does not support HTTPS endpoints. However, this is only a dev-time consideration. Service discovery when published can use HTTPS without any problems.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.0.0 171 11/25/2025
13.0.0-beta.462 113 11/25/2025
13.0.0-beta.456 126 11/23/2025
13.0.0-beta.454 74 11/23/2025
13.0.0-beta.453 95 11/22/2025
13.0.0-beta.450 101 11/22/2025
13.0.0-beta.448 100 11/22/2025
13.0.0-beta.444 330 11/17/2025
13.0.0-beta.443 250 11/17/2025
13.0.0-beta.440 82 11/15/2025
13.0.0-beta.439 223 11/12/2025
13.0.0-beta.438 216 11/12/2025
13.0.0-beta.436 217 11/12/2025
13.0.0-beta.435 226 11/11/2025
13.0.0-beta.433 142 11/10/2025
13.0.0-beta.432 142 11/10/2025
13.0.0-beta.431 135 11/6/2025
13.0.0-beta.430 130 11/6/2025
9.9.0 408 11/3/2025
9.9.0-beta.427 142 11/3/2025
9.8.1-beta.426 137 11/3/2025
9.8.1-beta.424 128 10/28/2025
9.8.1-beta.420 133 10/27/2025
9.8.1-beta.419 123 10/27/2025
9.8.1-beta.417 125 10/27/2025
9.8.1-beta.414 121 10/24/2025
9.8.1-beta.413 124 10/22/2025
9.8.1-beta.410 123 10/16/2025
9.8.1-beta.408 116 10/16/2025
9.8.1-beta.407 112 10/16/2025
9.8.1-beta.406 126 10/15/2025
9.8.0 325 9/26/2025
9.8.0-beta.405 123 10/15/2025
9.8.0-beta.404 121 10/13/2025
9.8.0-beta.402 132 9/29/2025
9.8.0-beta.401 128 9/29/2025
9.8.0-beta.399 124 9/26/2025
9.8.0-beta.398 126 9/25/2025
9.8.0-beta.397 130 9/25/2025
9.8.0-beta.395 125 9/24/2025
9.8.0-beta.394 130 9/23/2025
9.8.0-beta.393 133 9/23/2025
9.8.0-beta.392 130 9/23/2025
9.8.0-beta.389 249 9/18/2025
9.8.0-beta.388 259 9/16/2025
9.8.0-beta.386 203 9/15/2025
9.8.0-beta.385 202 9/15/2025
9.8.0-beta.384 49 9/13/2025
9.8.0-beta.376 137 9/8/2025
9.8.0-beta.375 60 9/6/2025
9.8.0-beta.373 142 9/5/2025
9.8.0-beta.372 137 9/4/2025
9.8.0-beta.370 131 9/2/2025
9.8.0-beta.364 126 9/1/2025
9.7.2 348 8/29/2025
9.7.2-beta.362 170 8/29/2025
9.7.2-beta.361 175 8/29/2025
9.7.2-beta.360 171 8/29/2025
9.7.2-beta.359 170 8/28/2025
9.7.2-beta.358 171 8/28/2025
9.7.2-beta.357 170 8/28/2025
9.7.1 226 8/27/2025
9.7.1-beta.355 175 8/27/2025
9.7.1-beta.354 180 8/27/2025
9.7.1-beta.353 175 8/27/2025
9.7.1-beta.352 177 8/27/2025
9.7.1-beta.351 175 8/27/2025
9.7.1-beta.348 144 8/14/2025
9.7.1-beta.344 82 8/10/2025
9.7.1-beta.343 203 8/8/2025
9.7.1-beta.342 209 8/7/2025
9.7.1-beta.341 208 8/6/2025
9.7.1-beta.340 198 8/5/2025
9.7.1-beta.339 194 8/5/2025
9.7.0 173 8/1/2025
9.7.0-beta.337 96 8/1/2025
9.7.0-beta.336 98 8/1/2025
9.7.0-beta.335 106 8/1/2025
9.7.0-beta.333 105 7/30/2025
9.6.1-beta.332 102 7/30/2025
9.6.1-beta.331 105 7/30/2025
9.6.1-beta.330 101 7/30/2025
9.6.1-beta.329 104 7/30/2025
9.6.1-beta.328 139 7/29/2025
9.6.1-beta.327 119 7/28/2025
9.6.1-beta.326 121 7/28/2025
9.6.0 237 7/10/2025
9.6.0-beta.324 133 7/10/2025
9.5.1-beta.323 131 7/10/2025
9.5.1-beta.322 132 7/10/2025
9.5.1-beta.321 138 7/10/2025
9.5.1-beta.320 136 7/9/2025
9.5.1-beta.319 133 7/8/2025
9.5.1-beta.318 134 7/2/2025
9.5.1-beta.317 128 6/30/2025
9.5.1-beta.315 134 6/26/2025
9.5.1-beta.314 158 6/23/2025
9.5.1-beta.313 118 6/20/2025
9.5.1-beta.312 151 6/20/2025
9.5.1-beta.311 164 6/18/2025
9.5.1-beta.310 135 6/17/2025
9.5.1-beta.309 149 6/17/2025
9.5.1-beta.308 131 6/17/2025
9.5.1-beta.307 154 6/16/2025
9.5.1-beta.306 299 6/11/2025
9.5.1-beta.305 102 6/7/2025
9.5.1-beta.304 145 6/6/2025
9.5.1-beta.303 157 6/4/2025
9.5.1-beta.302 128 6/4/2025
9.5.1-beta.301 150 6/2/2025
9.5.1-beta.300 155 5/28/2025
9.5.0 270 5/27/2025
9.5.0-beta.299 155 5/27/2025
9.5.0-beta.298 154 5/26/2025
9.5.0-beta.297 111 5/24/2025
9.5.0-beta.296 86 5/24/2025
9.5.0-beta.295 66 5/24/2025
9.4.1-beta.291 153 5/19/2025
9.4.1-beta.289 150 5/16/2025
9.4.1-beta.288 213 5/16/2025
9.4.1-beta.287 226 5/16/2025
9.4.1-beta.286 222 5/16/2025
9.4.1-beta.285 241 5/14/2025
9.4.1-beta.284 235 5/13/2025
9.4.1-beta.283 247 5/12/2025
9.4.1-beta.282 166 5/7/2025
9.4.1-beta.280 207 5/2/2025
9.4.1-beta.279 154 5/2/2025
9.4.1-beta.277 182 4/23/2025
9.4.1-beta.276 151 4/23/2025
9.4.1-beta.275 163 4/23/2025
9.4.1-beta.274 169 4/23/2025
9.4.1-beta.273 175 4/23/2025
9.4.1-beta.272 175 4/23/2025
9.4.1-beta.271 174 4/23/2025
9.4.1-beta.270 160 4/20/2025
9.4.0 315 4/20/2025
9.4.0-beta.269 186 4/20/2025
9.4.0-beta.268 168 4/20/2025
9.3.1-beta.267 180 4/20/2025
9.3.1-beta.266 97 4/19/2025
9.3.1-beta.265 177 4/15/2025
9.3.1-beta.264 190 4/15/2025
9.3.1-beta.263 206 4/15/2025
9.3.1-beta.262 204 4/15/2025
9.3.1-beta.260 183 4/10/2025
9.3.1-beta.259 184 4/8/2025
9.3.1-beta.258 147 4/8/2025
9.3.1-beta.257 173 4/8/2025
9.3.1-beta.256 173 4/8/2025
9.3.1-beta.255 176 4/8/2025
9.3.1-beta.254 191 4/8/2025
9.3.1-beta.253 150 4/1/2025
9.3.1-beta.252 137 3/27/2025
9.3.1-beta.250 152 3/27/2025
9.3.1-beta.249 163 3/27/2025
9.3.1-beta.248 127 3/27/2025
9.3.1-beta.247 151 3/27/2025
9.3.1-beta.244 496 3/25/2025
9.3.1-beta.242 491 3/24/2025
9.3.1-beta.241 169 3/19/2025
9.3.0 1,374 3/19/2025
9.3.0-beta.239 157 3/19/2025
9.2.2-beta.237 162 3/19/2025
9.2.2-beta.236 134 3/14/2025
9.2.2-beta.230 173 3/13/2025
9.2.2-beta.229 156 3/13/2025
9.2.2-beta.228 189 3/11/2025
9.2.2-beta.227 172 3/11/2025
9.2.2-beta.226 170 3/11/2025
9.2.2-beta.225 162 3/11/2025
9.2.2-beta.224 154 3/11/2025
9.2.2-beta.223 186 3/10/2025
9.2.2-beta.222 148 3/10/2025
9.2.2-beta.220 158 3/9/2025
9.2.2-beta.218 179 3/9/2025
9.2.2-beta.217 213 3/7/2025
9.2.2-beta.216 212 3/7/2025
9.2.2-beta.215 220 3/7/2025
9.2.2-beta.214 193 3/5/2025
9.2.2-beta.213 203 3/5/2025
9.2.2-beta.212 204 3/5/2025
9.2.2-beta.211 217 3/4/2025
9.2.2-beta.210 218 3/4/2025
9.2.2-beta.208 86 3/3/2025
9.2.1 221 3/3/2025
9.2.1-beta.207 138 3/2/2025
9.2.1-beta.206 116 3/1/2025
9.2.1-beta.205 109 2/27/2025
9.2.1-beta.204 102 2/26/2025
9.2.1-beta.203 98 2/26/2025
9.2.0 220 2/26/2025
9.2.0-beta.202 89 2/26/2025
9.2.0-beta.201 99 2/26/2025
9.2.0-beta.199 109 2/26/2025
9.2.0-beta.198 78 2/26/2025
9.1.1-beta.197 123 2/25/2025
9.1.1-beta.196 103 2/25/2025
9.1.1-beta.195 100 2/25/2025
9.1.1-beta.194 87 2/25/2025
9.1.1-beta.193 110 2/25/2025
9.1.1-beta.192 124 2/24/2025
9.1.1-beta.191 112 2/24/2025
9.1.1-beta.190 86 2/19/2025
9.1.1-beta.189 107 2/19/2025
9.1.1-beta.188 106 2/19/2025
9.1.1-beta.187 118 2/19/2025
9.1.1-beta.183 123 2/18/2025
9.1.1-beta.182 122 2/18/2025
9.1.1-beta.181 122 2/18/2025
9.1.1-beta.180 88 2/17/2025
9.1.1-beta.178 119 2/17/2025
9.1.1-beta.177 122 2/12/2025
9.1.1-beta.176 98 2/11/2025
9.1.1-beta.175 110 2/11/2025
9.1.1-beta.173 123 2/10/2025
9.1.1-beta.169 94 2/6/2025
9.1.1-beta.168 99 2/5/2025
9.1.1-beta.166 107 2/5/2025
9.1.1-beta.165 107 2/5/2025
9.1.1-beta.164 110 2/3/2025
9.1.1-beta.162 101 2/3/2025
9.1.1-beta.155 88 1/30/2025
9.1.1-beta.154 106 1/30/2025
9.1.1-beta.153 83 1/30/2025
9.1.1-beta.152 102 1/29/2025
9.1.1-beta.150 106 1/29/2025
9.1.1-beta.148 109 1/26/2025
9.1.1-beta.147 104 1/26/2025
9.1.1-beta.146 104 1/23/2025
9.1.1-beta.145 98 1/22/2025
9.1.1-beta.144 92 1/22/2025
9.1.1-beta.142 76 1/22/2025
9.1.1-beta.140 91 1/22/2025
9.1.1-beta.139 111 1/21/2025
9.1.1-beta.138 117 1/20/2025
9.1.1-beta.137 76 1/17/2025
9.1.1-beta.136 69 1/15/2025
9.1.1-beta.135 65 1/15/2025
9.1.1-beta.134 49 1/15/2025
9.1.1-beta.128 72 1/9/2025
9.1.1-beta.127 65 1/9/2025
9.1.1-beta.126 87 1/9/2025
9.1.1-beta.125 97 1/9/2025
9.1.1-beta.124 103 1/9/2025
9.1.0 512 12/12/2024
9.1.0-beta.123 110 1/3/2025
9.1.0-beta.122 111 1/3/2025
9.1.0-beta.121 111 1/2/2025
9.1.0-beta.120 86 12/30/2024
9.1.0-beta.119 102 12/30/2024
9.1.0-beta.118 100 12/30/2024
9.1.0-beta.116 100 12/30/2024
9.1.0-beta.114 107 12/30/2024
9.1.0-beta.113 79 12/30/2024
9.1.0-beta.112 87 12/18/2024
9.1.0-beta.110 90 12/16/2024
9.1.0-beta.109 112 12/12/2024
9.0.1-beta.108 115 12/12/2024
9.0.1-beta.107 84 12/11/2024
9.0.1-beta.106 111 12/12/2024
9.0.1-beta.104 79 12/11/2024
9.0.1-beta.102 82 12/6/2024
9.0.1-beta.99 109 12/6/2024
9.0.1-beta.98 77 12/6/2024
9.0.1-beta.95 112 12/5/2024
9.0.1-beta.94 100 12/5/2024
9.0.1-beta.93 114 12/2/2024
9.0.1-beta.92 98 11/30/2024
9.0.1-beta.91 102 11/30/2024
9.0.1-beta.90 96 11/29/2024
9.0.1-beta.89 116 11/29/2024
9.0.1-beta.88 105 11/27/2024
9.0.1-beta.87 94 11/27/2024
9.0.1-beta.86 109 11/27/2024
9.0.1-beta.84 85 11/24/2024
9.0.1-beta.83 110 11/22/2024
9.0.1-beta.82 91 11/21/2024
9.0.1-beta.81 84 11/19/2024
9.0.1-beta.80 97 11/19/2024
9.0.1-beta.79 100 11/19/2024
9.0.1-beta.77 118 11/15/2024
9.0.0 200 11/15/2024
9.0.0-beta.76 103 11/14/2024
9.0.0-beta.75 112 11/14/2024
9.0.0-beta.74 102 11/14/2024
9.0.0-beta.73 83 11/14/2024
9.0.0-beta.72 103 11/14/2024
9.0.0-beta.71 113 11/13/2024
9.0.0-beta.70 113 11/13/2024
9.0.0-beta.69 105 11/13/2024
9.0.0-beta.68 87 11/13/2024
9.0.0-beta.67 119 11/13/2024
9.0.0-beta.66 123 11/13/2024
9.0.0-beta.63 109 11/12/2024
9.0.0-beta.54 112 10/31/2024
1.0.0-beta.60 92 11/11/2024
1.0.0-beta.58 110 11/4/2024
1.0.0-beta.57 98 11/1/2024
1.0.0-beta.56 92 11/1/2024
1.0.0-beta.55 102 11/1/2024