GatewayUrl in Azure Portal UI and REST Api differ
We have decided to go all in when it comes to ARM Templating, and our goal is to depend on as few parameters as possible and instead retrieve as may information from the system settings as possible.
While creating ARM Templates for Api Management I discovered that what i did see on my Azure Portal in Api Management Service in the Gateway Url property was not the value to be found when retrieving it using my ARM Template. Trying to figure out what happens i did a REST Api lookup and to my big surprise GatewayUrl via REST Api and Azure portal UI differ.
Of course i found the expected hostname in the hostnameConfigurations array in my case it was index 3, but if i have to retrieve my wanted informations from the array i have to add additional logic to figure out the correct index. And i would consider this a bad workaround.
If have to admit, that i do not understand why the Azure Portal UI and the REST Api differ, to me it means that microsoft has performed a workaround in the Azure Portal UI instead of correcting the data stored in the GatewayUrl property. As I see it the GatewayUrl should always reflect the entry in the array hostnameConfigurations where the property defaultSslBinding is set to true.
Maybe too few are using their own domains in ApiM so this has not been seen as a topic yet, but i still hope you will consider correcting this.
To me it looks like a minor change, that will make life easier and less confusing.