Ir al contenido
DocsTry Aspire
DocsTry

Get started with Data API Builder

Esta página aún no está disponible en tu idioma.

⭐ Community Toolkit Data API Builder logo

Data API Builder (DAB) generates REST and GraphQL endpoints from a database schema and a declarative configuration file. The Aspire hosting integration runs DAB as a container, passes database connections to it, and exposes its HTTP endpoint to consuming apps.

  • One application model. Model DAB, its databases, and its consuming apps in the same AppHost.
  • Configuration-file mounting. Aspire mounts one or more DAB configuration files into the container.
  • Database reference injection. Referenced database resources provide the connection strings that DAB reads from its configuration.
  • Service discovery. Consuming apps can resolve the DAB HTTP endpoint by resource name or read its endpoint environment variable.
  • Language-neutral APIs. C#, TypeScript, Python, and Go apps can use any standard HTTP or GraphQL client.
architecture-beta

  group apphost(server)[AppHost]
  group consumer(server)[Consuming app]

  service database(database)[Database] in apphost
  service dab(server)[Data API Builder] in apphost
  service app(server)[Application] in consumer

  database:R --> L:dab
  dab:R --> L:app
  1. Add the hosting integration, provide a DAB configuration file, and reference each database that the API exposes.

    Set up Data API Builder

  2. Reference DAB from the consuming app, then call its REST or GraphQL endpoint with the HTTP client for your language.

    Connect to Data API Builder