Share via

Adding additional properties to product or Subscription Key

Simran Bhagnani 1 Reputation point
2021-07-09T07:42:17.347+00:00

I have requirement in APIMS where every product is associated with a network ID and rather than allowing the User to fill the network Id via the developer portal, the system should be able to identify the networkId based on the context product ( which is known when User selects the subscription key) and pass it as a Template parameter in the request to the backend service

So the get endpoint has something like /api/{networkId}/network/junctions

and the Template parameter networkId gets prepopulated with the networkId associated with the product

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

0 comments No comments

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 27,671 Reputation points Microsoft Employee Moderator
    2021-07-09T19:19:12.397+00:00

    Hello @Simran Bhagnani , Thank you for reaching out.
    I think the requirement can be achieved by using policy expressions. You can fetch the subscription ID using context.Subscription variable and then map the known subscription ID with the required network ID. You can then use a suitable transformation policy to update the endpoint with the Network ID.
    Please let me know if there are any concerns. Thank you!

    Was this answer helpful?

    0 comments No comments

Your answer

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