Implementing Separate Data Dictionaries for Azure Functions APIs in API Management with Azure SQL

hampton123 1,165 Reputation points
2023-10-30T19:23:20.05+00:00

I have different APIs (Azure Functions Node js) in API Management accessing different SQL tables in Azure SQL. I have an HTML page used in my Azure Storage account (SPA using B2C) for users to login and access my APIs, and depending on their subscription key provided they will see and have access to certain APIs. My company wants different data dictionaries for each individual API, and they only want them to be accessible via the API the user is accessing. I was wondering how this could be done. Thank you in advance, and please let me know if more information is required.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,218 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,198 questions
{count} votes

Accepted answer
  1. Pramod Valavala 20,641 Reputation points Microsoft Employee
    2023-11-03T14:43:24.33+00:00

    @Hunter B Thanks! That does help a bit.

    If I understand correctly, your frontend needs to fetch this dictionary based on their subscription key to render the UI accordingly. Also, your backend would need it to construct SQL queries on the fly.

    If that is indeed the case, I would simple suggest storing this dictionary in blob storage and expose an endpoint on your APIM that fetches it for the frontend, and your backend function app would simply fetch (and ideally cache in memory) when a request comes in with a particular subscription key.

    Also, if possible, it would be better to use a different format like JSON for the data dictionary as they are better supported by most languages without additional libraries.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.