@Stanislav Fotev Greetings!
To determine the cost for a specific disk type using the Price Sheet API, you'll need to use multiple filters/combination of those to get the unique value for the correct SKU. This section in the doc https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices#api-filters mentions multiple filter parameters.
Here's how you can do it:
Use the endpoint https://prices.azure.com/api/retail/prices?api-version=2023-01-01-preview
Add query parameters to filter by the SKU and region. For example:
https://prices.azure.com/api/retail/prices?api-version=2023-01-01-preview&$filter=serviceName eq 'Storage' and skuName eq 'Standard_LRS' and regionName eq 'Germany West Central'
The API will return a JSON response with the pricing details for the specified SKU and region.
You can compare the API response with the Azure Pricing Calculator to ensure the estimated cost matches2. For example, if the calculator estimates $1.54 for a S4 HDD in Germany West Central, you should see a similar price in the API response.
Regarding your question about using the Azure calculator via an API call, unfortunately, there isn't a direct API call to the Azure Pricing Calculator. However, you can use the Price Sheet API to programmatically retrieve pricing information and build your own cost estimation tool.
Hope this helps. Please post a reply if you need further assistance.