{"id":18148230,"url":"https://github.com/azure/data-api-builder","last_synced_at":"2025-05-14T15:05:07.291Z","repository":{"id":143001492,"uuid":"401807767","full_name":"Azure/data-api-builder","owner":"Azure","description":"Data API builder provides modern REST and GraphQL endpoints to your Azure Databases and on-prem stores.","archived":false,"fork":false,"pushed_at":"2025-04-04T23:09:08.000Z","size":86906,"stargazers_count":1060,"open_issues_count":369,"forks_count":234,"subscribers_count":54,"default_branch":"main","last_synced_at":"2025-04-06T05:04:27.063Z","etag":null,"topics":["api","azure","database","graphql","hacktoberfest","microsoft","rest"],"latest_commit_sha":null,"homepage":"https://aka.ms/dab/docs","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-31T18:37:59.000Z","updated_at":"2025-04-04T22:09:43.000Z","dependencies_parsed_at":"2023-09-22T22:05:30.853Z","dependency_job_id":"5dacc29c-cbef-452e-b679-559a5f569e41","html_url":"https://github.com/Azure/data-api-builder","commit_stats":{"total_commits":971,"total_committers":54,"mean_commits":17.98148148148148,"dds":0.8650875386199794,"last_synced_commit":"304f8d293053d748e402a981e2d082e1258a0f0a"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdata-api-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdata-api-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdata-api-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdata-api-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/data-api-builder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688542,"owners_count":21145763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","azure","database","graphql","hacktoberfest","microsoft","rest"],"created_at":"2024-11-01T23:07:39.655Z","updated_at":"2025-05-14T15:05:07.267Z","avatar_url":"https://github.com/Azure.png","language":"C#","readme":"# Data API builder for Azure Databases\n\n[![NuGet Package](https://img.shields.io/nuget/v/microsoft.dataapibuilder.svg?color=success)](https://www.nuget.org/packages/Microsoft.DataApiBuilder)\n[![Nuget Downloads](https://img.shields.io/nuget/dt/Microsoft.DataApiBuilder)](https://www.nuget.org/packages/Microsoft.DataApiBuilder)\n[![Documentation](https://img.shields.io/badge/docs-website-%23fc0)](https://learn.microsoft.com/azure/data-api-builder/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n[What's new?](https://learn.microsoft.com/azure/data-api-builder/whats-new)\n\n## Community\n\nJoin the Data API builder community! This sign up will help us maintain a list of interested developers to be part of our roadmap and to help us better understand the different ways DAB is being used. Sign up [here](https://forms.office.com/pages/responsepage.aspx?id=v4j5cvGGr0GRqy180BHbR1S1JdzGAxhDrefV-tBYtwZUNE1RWVo0SUVMTkRESUZLMVVOS0wwUFNVRy4u).\n\n![](docs/media/dab-logo.png)\n\n## About Data API builder\n\nData 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.\n\n```mermaid\nerDiagram\n    DATA_API_BUILDER ||--|{ DATA_API : \"Provides\"\n    DATA_API_BUILDER {\n        container true \"Microsoft Container Repository\"\n        open-source true \"MIT license / any cloud or on-prem.\"\n        objects true \"Supports: Table / View / Stored Procedure\"\n        developer true \"Swagger / Nitro (fka Banana Cake Pop)\"\n        otel true \"Open Telemetry / Structured Logs / Health Endpoints\"\n        security true \"EntraId / EasyAuth / OAuth / JWT / Anonymous\"\n        cache true \"Level1 (in-memory) / Level2 (redis)\"\n        policy true \"Item policy / Database policy / Claims policy\"\n        hot_reload true \"Dynamically controllable log levels\"\n    }\n    DATA_API ||--o{ DATASOURCE : \"Queries\"\n    DATA_API {\n        REST true \"$select / $filter / $orderby\"\n        GraphQL true \"relationships / multiple mutations\"\n    }\n    DATASOURCE {\n        MS_SQL Supported\n        PostgreSQL Supported\n        Cosmos_DB Supported\n        MySQL Supported\n        SQL_DW Supported\n    }\n    CLIENT ||--o{ DATA_API : \"Consumes\"\n    CLIENT {\n        Transport HTTP \"HTTP / HTTPS\"\n        Syntax JSON \"Standard payloads\"\n        Mobile Supported \"No requirement\"\n        Web Supported \"No requirement\"\n        Desktop Supported \"No requirement\"\n        Language Any \"No requirement\"\n        Framework None \"Not required\"\n        Library None \"Not required\"\n        ORM None \"Not required\"\n        Driver None \"Not required\"\n    }\n```\n\n## Getting Started\n\nUse 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. It gives you hands-on experience with how DAB makes you more efficient by removing boilerplate code.\n\n**1. Install the DAB CLI**\n\nThe [DAB CLI](https://aka.ms/dab/docs) is a cross-platform .NET tool. Install the [.NET SDK](https://get.dot.net) before running:\n\n```\ndotnet tool install microsoft.dataapibuilder -g\n```\n\n**2. Create your initial configuration file**\n\nDAB requires a JSON configuration file. Edit manually or with the CLI. Use `dab --help` for syntax options.\n\n```\ndab init\n  --database-type mssql\n  --connection-string \"@env('my-connection-string')\"\n  --host-mode development\n```\n\n**3. Add your first table**\n\nDAB supports tables, views, and stored procedures. It works with SQL Server, Azure Cosmos DB, PostgreSQL, MySQL, and SQL Data Warehouse. Security is engine-level, but permissions are per entity.\n\n```\ndab add Actor\n  --source \"dbo.Actor\"\n  --permissions \"anonymous:*\"\n```\n\n**4. Run Data API builder**\n\nIn `production`, DAB runs in a container. In `development`, it’s self-hosted locally with hot reload, Swagger, and Nitro (fka Banana Cake Pop) support.\n\n```\ndab start\n```\n\n\u003e **Note**: Before you run `dab start`, make sure your connection string is stored in an environment variable called `my-connection-string`. This is required for `@env('my-connection-string')` in your config file to work. The easiest way is to create a `.env` file with `name=value` pairs—DAB will load these automatically at runtime.\n\n**5. Access your data source**\n\nBy default, DAB enables both REST and GraphQL. REST supports `$select`, `$filter`, and `$orderBy`. GraphQL uses config-defined relationships.\n\n```\nGET http://localhost:5000/api/Actor\n```\n\n### Walk-through video\n\n\u003ca href=\"https://www.youtube.com/watch?v=xAlaoDQolLw\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://img.youtube.com/vi/xAlaoDQolLw/0.jpg\" alt=\"Play Video\" width=\"280\" /\u003e\n\u003c/a\u003e\n\nDemo source code: [startrek](https://aka.ms/dab/startrek)\n\n## Overview\n\n| Category       | Features |\n|----------------|----------|\n| **Database Objects** | • NoSQL collections\u003cbr\u003e• RDBMS tables, views, stored procedures |\n| **Data Sources** | • SQL Server \u0026 Azure SQL\u003cbr\u003e• Azure Cosmos DB\u003cbr\u003e• PostgreSQL\u003cbr\u003e• MySQL |\n| **REST** | • `$select` for projection\u003cbr\u003e• `$filter` for filtering\u003cbr\u003e• `$orderBy` for sorting |\n| **GraphQL** | • Relationship navigation\u003cbr\u003e• Data aggregation\u003cbr\u003e• Multiple mutations |\n| **Telemetry** | • Structured logs\u003cbr\u003e• OpenTelemetry\u003cbr\u003e• Application Insights\u003cbr\u003e• Health endpoints |\n| **Advanced** | • Pagination\u003cbr\u003e• Level 1 (in-memory) cache\u003cbr\u003e• Level 2 (Redis) cache |\n| **Authentication** | • OAuth2/JWT\u003cbr\u003e• EasyAuth\u003cbr\u003e• Entra ID |\n| **Authorization** | • Role-based support\u003cbr\u003e• Entity permissions\u003cbr\u003e• Database policies |\n| **Developer** | • Cross-platform CLI\u003cbr\u003e• Swagger (REST)\u003cbr\u003e• Banana Cake Pop (GraphQL)\u003cbr\u003e• Open Source\u003cbr\u003e• Hot Reload |\n\n## How does it work?\n\nThis diagram shows how DAB works. DAB dynamically creates endpoints from your config file. It translates HTTP requests to SQL, returns JSON, and auto-pages results.\n\n```mermaid\nsequenceDiagram\n    actor Client\n\n    box Data API builder (DAB)\n        participant Endpoint\n        participant QueryBuilder\n    end\n\n    participant Configuration as Configuration File\n\n    box Data Source\n        participant DB\n    end\n\n    Endpoint-\u003e\u003eEndpoint: Start\n    activate Endpoint\n        Endpoint-\u003e\u003eConfiguration: Request\n        Configuration--\u003e\u003eEndpoint: Configuration\n        Endpoint-\u003e\u003eDB: Request\n        DB--\u003e\u003eEndpoint: Metadata\n            Note over Endpoint, DB: Some configuration is validated against the metadata\n        Endpoint--\u003e\u003eEndpoint: Configure\n    deactivate Endpoint\n    Client--\u003e\u003eEndpoint: HTTP Request\n    activate Endpoint\n        critical\n        Endpoint--\u003e\u003eEndpoint: Authenticate\n        Endpoint--\u003e\u003eEndpoint: Authorize\n        end\n        Endpoint-\u003e\u003eQueryBuilder: Request\n        QueryBuilder--\u003e\u003eEndpoint: SQL\n        alt Cache\n            Endpoint--\u003e\u003eEndpoint: Use Cache\n        else Query\n            Endpoint--\u003e\u003eDB: Request\n            Note over Endpoint, DB: Query is automatically throttled and results paginated\n            DB-\u003e\u003eEndpoint: Results\n            Note over Endpoint, DB: Results are automatically cached for use in next request\n        end\n        Endpoint-\u003e\u003eClient: HTTP 200\n    deactivate Endpoint\n```\n\nBecause DAB is stateless, it can scale up or out using any container size. It builds a feature-rich API like you would from scratch—but now you don’t have to.\n\n## Additional Resources\n\n- [Online Documentation](https://aka.ms/dab/docs)  \n- [Official Samples](https://aka.ms/dab/samples)  \n- [Known Issues](https://learn.microsoft.com/azure/data-api-builder/known-issues)  \n- [Feature Roadmap](https://github.com/Azure/data-api-builder/discussions/1377)\n\n#### References\n\n- [Microsoft REST API Guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md)  \n- [Microsoft Azure REST API Guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md)  \n- [GraphQL Specification](https://graphql.org/)\n\n### How to Contribute\n\nTo contribute, see these documents:\n\n- [Code of Conduct](./CODE_OF_CONDUCT.md)  \n- [Security](./SECURITY.md)  \n- [Contributing](./CONTRIBUTING.md)\n\n### License\n\n**Data API builder for Azure Databases** is licensed under the MIT License. See [LICENSE](./LICENSE.txt) for details.\n\n### Third-Party Component Notice\n\nNitro (fka Banana Cake Pop by ChilliCream, Inc.) may optionally store work in its cloud service via your ChilliCream account. Microsoft is not affiliated with or endorsing this service. Use at your discretion.\n\n### Trademarks\n\nThis project may use trademarks or logos. Use of Microsoft trademarks must follow Microsoft’s [Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks). Use of third-party marks is subject to their policies.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fdata-api-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Fdata-api-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fdata-api-builder/lists"}