Option List script example for specific Azure plans

Is there a way to extract only specific Azure plans from the Options List with REST/API? If this is possible could you provide an example of a translation/request script?

Yep so if you make a REST Option Type, set it to:
https://FQDN/api/service-plans?max=1000&includeZones=true&provisionTypeId=4 (you will have to determine the provisionTypeId for Azure)

Then the translate is

for(var x=0;x < data.servicePlans.length; x++) {
  results.push({name: data.servicePlans[x].name, value:data.servicePlans[x].id});
}

That should work!

1 Like