With a working DAB solution, you can now deploy to Azure or any other service. Deploying to Azure is simplified by using the Azure Developer CLI, logging in to your account, and defining an environment. The CLI will generate the necessary Bicep code and, as DAB is a Docker container, will upload configurations and enable it and an Azure database, along with a basic web application, as a set of Azure Container Apps. Again, you’ll be presented with an endpoint URI that you can test using Azure’s built-in OpenAPI tool.
Using DAB from your code
With an API built and running, you can start to use it in your code. The API is RESTful, so you can build requests using familiar HTTP API grammars, with the ability to manage read, write, replace, and update operations, as well as delete. These are the familiar CRUD operators used by most database applications and can be applied by choosing the appropriate HTTP method used to call the API.
Results are returned as JSON, with a default of 100 records. As well as large-scale retrievals, you’re able to use primary keys to specific items. You can use a single key or, where available, compound keys. More complex queries can be constructed using parameters; standard SQL select and filter queries are common options that can keep traffic to a minimum, as the operations are carried out in the DAB container and only the results are returned to your client application.