Sure Vivek!
So to start off: an Azure Function App approach could also work. I usually aim to use low-code (Logic Apps) when possible and full-code (Function App) when needed. However, it depends on your needs and preferences.
Note: check your scaling and pricing based on the needed performance and abilities.
So, either way, you can:
- Set up an Azure Function using the HTTP-trigger where you load the ‘System.Data.SqlClient’ NuGet package which you can use to connect to SQL, read the table and provide the query output as response
- Please find more information on working with SQL in Azure Functions in the article below which can act as guidance on your case: https://learn.microsoft.com/en-us/azure/azure-functions/functions-scenario-database-table-cleanup
- Create a Logic App where you use a Request-trigger and a ‘SQL Server’ action to read the table. Next you’ll provide the result in a response action.
After you’ve connected either your Logic App or Function App you can use the following docs to import them into the API Management:
Please note that the default security of the APIM is subscription key. You can also, based on your requirments, extend this to OAuth or OpenID for better security.
Let me know if this was the level of detail you were looking for. If we need to touch on something more in depth, feel free to reach out.