Source: Data API builder GitHub
After creating and populating a database, the next step is providing access to its data through an API. If you’ve ever faced a scenario like this, you’ve probably written code to create, read, update, or delete, known as CRUD (Create, Read, Update, Delete) operations for each endpoint. What if there was a way to simplify this step?
What is Data API builder?
The Data API Builder is a Microsoft open-source engine that converts REST and GraphQL into database queries. With the Data API builder, you can generate code based on your database schema that’s accessible through a REST or GraphQL API that will work with any language, platform, or device. It also comes with support for behaviors for organizing the data that require additional code, like pagination, filtering and sorting out of the box, reducing the time it takes to build the backend of your application.
Using the Data API builder
To create an API, the Data API builder requires a database and is compatible with the following databases:
The Data API builder can be used locally and offline, or in the cloud with Azure. To develop an API locally, the Data API builder (DAB) CLI tool enables any developer to create an API that’s testable and useable right away.
There are a few flexible options for working with the Data API builder in Azure. To quickly get a full stack web application up and running in minutes, the Azure Static Web Apps and its Database Connection feature has been fully integrated with the Data API builder. There’s no additional setup needed like connection strings, authorization, or any additional server-side code to start using the API right away. Just connect your existing Azure Database to your Static Web App.
Source: Announcing Data API Builder (Preview) for PostgreSQL
Another option for Data API builder on Azure is deploying it in a container or virtual machine.
With Data API builder for Azure databases, you can quickly build a fully functional backend with your database of choice to speed up your development process. Since it’s open source you can join the conversations in the Discussions page on the GitHub repository to provide feedback and share ideas.
Ready to try Data API builder out yourself?
Get started on Azure with Quickstarts that create a database, then build APIs from data in: Azure SQL , Azure Cosmos DB, PostgreSQL, or MySQL.
Watch the Azure Static Web Apps getting started guide on YouTube:
New to Azure? Get started with Azure for free.
If you’re a student, did you know that Azure offers a special subscription plan for students that comes with $100 of cloud credit without a credit card? Sign up for an Azure for Students to get access to many popular services like Azure Static Web Apps with little to no cost. Learn more about the Azure for Students here in this post.
If you’re new to APIs and databases and want to learn more about them in another post, leave a comment!