Reputation: 5366
If you go to this website https://datacenters.microsoft.com/globe/explore and you click on "region filters" and "sustainability filters" and you select "zero-waste certified" you can view the regions that are zero-waste certified.
I'd like to make a simple console app with C#.Net to retrieve these zero-waste regions. Because this website does it, I'm assuming it can be done with a REST API call? I've tried to look at the calls the website make itself, but I couldn't really figure it out. Azure.ResourceManager (the new nuget package because the other packages are deprecated) doesn't have zero-waste certified anywhere in it's metadata or whatever.
So, does anyone know how to retrieve this information from Azure in C#.Net? A call to a REST API is fine (via a SDK is even better). Thank you in advance.
Upvotes: 0
Views: 184
Reputation: 662
The webpage makes a call to the https://datacenters.microsoft.com/globe/data/geo/regions.json endpoint which returns all the regions and their datacenters, including a property with a collection of sustainabilityIds. I suspect that this is what is used to client side filter the list.
Upvotes: 0
Reputation: 11
I did not find API, but this page provide all the Sutainability factsheet of Azure datacenters. You can find inside the one that are certified (I don't know if it's hard to scrap).
It could be great to request this feature for this API (in preview) from Microsoft : https://learn.microsoft.com/en-us/industry/sustainability/api-overview
Upvotes: 0
Reputation: 181
It seems that there isn't any public API available for this currently.
A not so easy workaround could be to parse the response from URL and check the relevant section.
Upvotes: 0