question

SimranBhagnani-7602 avatar image
0 Votes"
SimranBhagnani-7602 asked ChaitanyaNaykodiMSFT-9638 answered

Adding additional properties to product or Subscription Key

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ChaitanyaNaykodiMSFT-9638 avatar image
0 Votes"
ChaitanyaNaykodiMSFT-9638 answered

Hello @SimranBhagnani-7602, 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!


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.