CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 13.1.1

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder --version 13.1.1
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder -Version 13.1.1
                    
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.1.1" />
                    
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.1.1" />
                    
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.1.1
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder, 13.1.1"
                    
#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.1.1
                    
#: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.1.1
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder&version=13.1.1
                    
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.1.2-beta.508 22 1/19/2026
13.1.2-beta.507 25 1/19/2026
13.1.2-beta.506 35 1/16/2026
13.1.2-beta.505 32 1/16/2026
13.1.2-beta.504 33 1/16/2026
13.1.1 73 1/16/2026
13.1.1-beta.502 31 1/16/2026
13.1.0 107 1/14/2026
13.1.0-beta.499 37 1/14/2026
13.0.1-beta.498 36 1/14/2026
13.0.1-beta.486 46 1/12/2026
13.0.1-beta.468 642 12/3/2025
13.0.1-beta.467 621 12/3/2025
13.0.0 1,090 11/25/2025
13.0.0-beta.462 136 11/25/2025
13.0.0-beta.456 149 11/23/2025
13.0.0-beta.454 98 11/23/2025
13.0.0-beta.453 109 11/22/2025
13.0.0-beta.450 119 11/22/2025
13.0.0-beta.448 126 11/22/2025
13.0.0-beta.444 349 11/17/2025
13.0.0-beta.443 271 11/17/2025
13.0.0-beta.440 102 11/15/2025
13.0.0-beta.439 242 11/12/2025
13.0.0-beta.438 230 11/12/2025
13.0.0-beta.436 236 11/12/2025
13.0.0-beta.435 244 11/11/2025
13.0.0-beta.433 162 11/10/2025
13.0.0-beta.432 159 11/10/2025
13.0.0-beta.431 154 11/6/2025
13.0.0-beta.430 153 11/6/2025
9.9.0 451 11/3/2025
9.9.0-beta.427 158 11/3/2025
9.8.1-beta.426 153 11/3/2025
9.8.1-beta.424 151 10/28/2025
9.8.1-beta.420 155 10/27/2025
9.8.1-beta.419 137 10/27/2025
9.8.1-beta.417 140 10/27/2025
9.8.1-beta.414 142 10/24/2025
9.8.1-beta.413 143 10/22/2025
9.8.1-beta.410 140 10/16/2025
9.8.1-beta.408 138 10/16/2025
9.8.1-beta.407 128 10/16/2025
9.8.1-beta.406 140 10/15/2025
9.8.0 354 9/26/2025
9.8.0-beta.405 137 10/15/2025
9.8.0-beta.404 135 10/13/2025
9.8.0-beta.402 142 9/29/2025
9.8.0-beta.401 140 9/29/2025
9.8.0-beta.399 137 9/26/2025
9.8.0-beta.398 142 9/25/2025
9.8.0-beta.397 145 9/25/2025
9.8.0-beta.395 139 9/24/2025
9.8.0-beta.394 148 9/23/2025
9.8.0-beta.393 148 9/23/2025
9.8.0-beta.392 144 9/23/2025
9.8.0-beta.389 264 9/18/2025
9.8.0-beta.388 269 9/16/2025
9.8.0-beta.386 221 9/15/2025
9.8.0-beta.385 212 9/15/2025
9.8.0-beta.384 67 9/13/2025
9.8.0-beta.376 156 9/8/2025
9.8.0-beta.375 79 9/6/2025
9.8.0-beta.373 156 9/5/2025
9.8.0-beta.372 151 9/4/2025
9.8.0-beta.370 145 9/2/2025
9.8.0-beta.364 142 9/1/2025
9.7.2 384 8/29/2025
9.7.2-beta.362 180 8/29/2025
9.7.2-beta.361 195 8/29/2025
9.7.2-beta.360 182 8/29/2025
9.7.2-beta.359 187 8/28/2025
9.7.2-beta.358 190 8/28/2025
9.7.2-beta.357 185 8/28/2025
9.7.1 250 8/27/2025
9.7.1-beta.355 189 8/27/2025
9.7.1-beta.354 194 8/27/2025
9.7.1-beta.353 192 8/27/2025
9.7.1-beta.352 194 8/27/2025
9.7.1-beta.351 183 8/27/2025
9.7.1-beta.348 154 8/14/2025
9.7.1-beta.344 93 8/10/2025
9.7.1-beta.343 222 8/8/2025
9.7.1-beta.342 225 8/7/2025
9.7.1-beta.341 221 8/6/2025
9.7.1-beta.340 209 8/5/2025
9.7.1-beta.339 205 8/5/2025
9.7.0 191 8/1/2025
9.7.0-beta.337 111 8/1/2025
9.7.0-beta.336 110 8/1/2025
9.7.0-beta.335 118 8/1/2025
9.7.0-beta.333 121 7/30/2025
9.6.1-beta.332 115 7/30/2025
9.6.1-beta.331 114 7/30/2025
9.6.1-beta.330 122 7/30/2025
9.6.1-beta.329 116 7/30/2025
9.6.1-beta.328 155 7/29/2025
9.6.1-beta.327 134 7/28/2025
9.6.1-beta.326 134 7/28/2025
9.6.0 265 7/10/2025
9.6.0-beta.324 151 7/10/2025
9.5.1-beta.323 148 7/10/2025
9.5.1-beta.322 149 7/10/2025
9.5.1-beta.321 153 7/10/2025
9.5.1-beta.320 150 7/9/2025
9.5.1-beta.319 149 7/8/2025
9.5.1-beta.318 147 7/2/2025
9.5.1-beta.317 144 6/30/2025
9.5.1-beta.315 150 6/26/2025
9.5.1-beta.314 174 6/23/2025
9.5.1-beta.313 132 6/20/2025
9.5.1-beta.312 159 6/20/2025
9.5.1-beta.311 180 6/18/2025
9.5.1-beta.310 146 6/17/2025
9.5.1-beta.309 160 6/17/2025
9.5.1-beta.308 149 6/17/2025
9.5.1-beta.307 170 6/16/2025
9.5.1-beta.306 312 6/11/2025
9.5.1-beta.305 122 6/7/2025
9.5.1-beta.304 153 6/6/2025
9.5.1-beta.303 175 6/4/2025
9.5.1-beta.302 140 6/4/2025
9.5.1-beta.301 168 6/2/2025
9.5.1-beta.300 169 5/28/2025
9.5.0 286 5/27/2025
9.5.0-beta.299 170 5/27/2025
9.5.0-beta.298 170 5/26/2025
9.5.0-beta.297 128 5/24/2025
9.5.0-beta.296 98 5/24/2025
9.5.0-beta.295 80 5/24/2025
9.4.1-beta.291 170 5/19/2025
9.4.1-beta.289 164 5/16/2025
9.4.1-beta.288 225 5/16/2025
9.4.1-beta.287 242 5/16/2025
9.4.1-beta.286 238 5/16/2025
9.4.1-beta.285 250 5/14/2025
9.4.1-beta.284 250 5/13/2025
9.4.1-beta.283 257 5/12/2025
9.4.1-beta.282 179 5/7/2025
9.4.1-beta.280 219 5/2/2025
9.4.1-beta.279 171 5/2/2025
9.4.1-beta.277 196 4/23/2025
9.4.1-beta.276 162 4/23/2025
9.4.1-beta.275 172 4/23/2025
9.4.1-beta.274 173 4/23/2025
9.4.1-beta.273 189 4/23/2025
9.4.1-beta.272 191 4/23/2025
9.4.1-beta.271 188 4/23/2025
9.4.1-beta.270 173 4/20/2025
9.4.0 327 4/20/2025
9.4.0-beta.269 201 4/20/2025
9.4.0-beta.268 183 4/20/2025
9.3.1-beta.267 198 4/20/2025
9.3.1-beta.266 111 4/19/2025
9.3.1-beta.265 191 4/15/2025
9.3.1-beta.264 203 4/15/2025
9.3.1-beta.263 214 4/15/2025
9.3.1-beta.262 222 4/15/2025
9.3.1-beta.260 194 4/10/2025
9.3.1-beta.259 200 4/8/2025
9.3.1-beta.258 162 4/8/2025
9.3.1-beta.257 191 4/8/2025
9.3.1-beta.256 184 4/8/2025
9.3.1-beta.255 194 4/8/2025
9.3.1-beta.254 205 4/8/2025
9.3.1-beta.253 163 4/1/2025
9.3.1-beta.252 148 3/27/2025
9.3.1-beta.250 164 3/27/2025
9.3.1-beta.249 177 3/27/2025
9.3.1-beta.248 143 3/27/2025
9.3.1-beta.247 163 3/27/2025
9.3.1-beta.244 513 3/25/2025
9.3.1-beta.242 505 3/24/2025
9.3.1-beta.241 184 3/19/2025
9.3.0 1,396 3/19/2025
9.3.0-beta.239 168 3/19/2025
9.2.2-beta.237 178 3/19/2025
9.2.2-beta.236 147 3/14/2025
9.2.2-beta.230 189 3/13/2025
9.2.2-beta.229 170 3/13/2025
9.2.2-beta.228 204 3/11/2025
9.2.2-beta.227 185 3/11/2025
9.2.2-beta.226 184 3/11/2025
9.2.2-beta.225 176 3/11/2025
9.2.2-beta.224 167 3/11/2025
9.2.2-beta.223 197 3/10/2025
9.2.2-beta.222 163 3/10/2025
9.2.2-beta.220 168 3/9/2025
9.2.2-beta.218 189 3/9/2025
9.2.2-beta.217 230 3/7/2025
9.2.2-beta.216 226 3/7/2025
9.2.2-beta.215 230 3/7/2025
9.2.2-beta.214 211 3/5/2025
9.2.2-beta.213 214 3/5/2025
9.2.2-beta.212 223 3/5/2025
9.2.2-beta.211 232 3/4/2025
9.2.2-beta.210 233 3/4/2025
9.2.2-beta.208 99 3/3/2025
9.2.1 238 3/3/2025
9.2.1-beta.207 149 3/2/2025
9.2.1-beta.206 127 3/1/2025
9.2.1-beta.205 129 2/27/2025
9.2.1-beta.204 115 2/26/2025
9.2.1-beta.203 111 2/26/2025
9.2.0 238 2/26/2025
9.2.0-beta.202 98 2/26/2025
9.2.0-beta.201 110 2/26/2025
9.2.0-beta.199 121 2/26/2025
9.2.0-beta.198 91 2/26/2025
9.1.1-beta.197 137 2/25/2025
9.1.1-beta.196 115 2/25/2025
9.1.1-beta.195 114 2/25/2025
9.1.1-beta.194 106 2/25/2025
9.1.1-beta.193 125 2/25/2025
9.1.1-beta.192 139 2/24/2025
9.1.1-beta.191 127 2/24/2025
9.1.1-beta.190 101 2/19/2025
9.1.1-beta.189 117 2/19/2025
9.1.1-beta.188 123 2/19/2025
9.1.1-beta.187 126 2/19/2025
9.1.1-beta.183 136 2/18/2025
9.1.1-beta.182 131 2/18/2025
9.1.1-beta.181 142 2/18/2025
9.1.1-beta.180 101 2/17/2025
9.1.1-beta.178 132 2/17/2025
9.1.1-beta.177 133 2/12/2025
9.1.1-beta.176 111 2/11/2025
9.1.1-beta.175 128 2/11/2025
9.1.1-beta.173 136 2/10/2025
9.1.1-beta.169 107 2/6/2025
9.1.1-beta.168 115 2/5/2025
9.1.1-beta.166 119 2/5/2025
9.1.1-beta.165 120 2/5/2025
9.1.1-beta.164 124 2/3/2025
9.1.1-beta.162 114 2/3/2025
9.1.1-beta.155 102 1/30/2025
9.1.1-beta.154 121 1/30/2025
9.1.1-beta.153 95 1/30/2025
9.1.1-beta.152 116 1/29/2025
9.1.1-beta.150 119 1/29/2025
9.1.1-beta.148 125 1/26/2025
9.1.1-beta.147 121 1/26/2025
9.1.1-beta.146 118 1/23/2025
9.1.1-beta.145 109 1/22/2025
9.1.1-beta.144 107 1/22/2025
9.1.1-beta.142 90 1/22/2025
9.1.1-beta.140 108 1/22/2025
9.1.1-beta.139 126 1/21/2025
9.1.1-beta.138 134 1/20/2025
9.1.1-beta.137 87 1/17/2025
9.1.1-beta.136 86 1/15/2025
9.1.1-beta.135 74 1/15/2025
9.1.1-beta.134 60 1/15/2025
9.1.1-beta.128 82 1/9/2025
9.1.1-beta.127 78 1/9/2025
9.1.1-beta.126 99 1/9/2025
9.1.1-beta.125 113 1/9/2025
9.1.1-beta.124 118 1/9/2025
9.1.0 524 12/12/2024
9.1.0-beta.123 118 1/3/2025
9.1.0-beta.122 124 1/3/2025
9.1.0-beta.121 128 1/2/2025
9.1.0-beta.120 101 12/30/2024
9.1.0-beta.119 118 12/30/2024
9.1.0-beta.118 113 12/30/2024
9.1.0-beta.116 115 12/30/2024
9.1.0-beta.114 120 12/30/2024
9.1.0-beta.113 92 12/30/2024
9.1.0-beta.112 99 12/18/2024
9.1.0-beta.110 102 12/16/2024
9.1.0-beta.109 129 12/12/2024
9.0.1-beta.108 133 12/12/2024
9.0.1-beta.107 94 12/11/2024
9.0.1-beta.106 131 12/12/2024
9.0.1-beta.104 96 12/11/2024
9.0.1-beta.102 96 12/6/2024
9.0.1-beta.99 122 12/6/2024
9.0.1-beta.98 94 12/6/2024
9.0.1-beta.95 122 12/5/2024
9.0.1-beta.94 116 12/5/2024
9.0.1-beta.93 124 12/2/2024
9.0.1-beta.92 115 11/30/2024
9.0.1-beta.91 119 11/30/2024
9.0.1-beta.90 113 11/29/2024
9.0.1-beta.89 125 11/29/2024
9.0.1-beta.88 123 11/27/2024
9.0.1-beta.87 111 11/27/2024
9.0.1-beta.86 126 11/27/2024
9.0.1-beta.84 100 11/24/2024
9.0.1-beta.83 129 11/22/2024
9.0.1-beta.82 111 11/21/2024
9.0.1-beta.81 96 11/19/2024
9.0.1-beta.80 110 11/19/2024
9.0.1-beta.79 113 11/19/2024
9.0.1-beta.77 133 11/15/2024
9.0.0 220 11/15/2024
9.0.0-beta.76 118 11/14/2024
9.0.0-beta.75 124 11/14/2024
9.0.0-beta.74 110 11/14/2024
9.0.0-beta.73 98 11/14/2024
9.0.0-beta.72 119 11/14/2024
9.0.0-beta.71 123 11/13/2024
9.0.0-beta.70 124 11/13/2024
9.0.0-beta.69 115 11/13/2024
9.0.0-beta.68 98 11/13/2024
9.0.0-beta.67 132 11/13/2024
9.0.0-beta.66 139 11/13/2024
9.0.0-beta.63 126 11/12/2024
9.0.0-beta.54 130 10/31/2024
1.0.0-beta.60 107 11/11/2024
1.0.0-beta.58 127 11/4/2024
1.0.0-beta.57 116 11/1/2024
1.0.0-beta.56 107 11/1/2024
1.0.0-beta.55 112 11/1/2024