0

I am pulling Recommendations from the Azure Advisor Rest Api and am not able to retrieve the extendedProperties values.

Specifically, I am looking for savings data from Recommendations of the Cost category.

In the following video at 58 seconds there is an example of the expected response.

https://www.youtube.com/watch?v=hAxrdmOAB8s

Are there specific permissions necessary to give my account in order to pull the data, or is the API not capable of supplying the values?

I am able to see the data in the portal, but the extendedProperties property is always empty.

David
  • 797
  • 2
  • 8
  • 23

1 Answers1

0

I'm supposing you're trying the Recommendations - List API.

Essentially, extended properties expose additional information about a recommendation from Azure Advisor.

AFAIK, they need not be present for every recommendation, and shouldn't need additional privileges to list. It could just be the case that the type of recommendations you are receiving do not have any to list.

Here is a sample response that I received that has a mix of both:

[
    {
        "properties": {
            "category": "Cost",
            "impact": "Medium",
            "impactedField": "Microsoft.Network/publicIPAddresses",
            "impactedValue": "foo",
            "lastUpdated": "2020-03-20T14:10:24.6928024Z",
            "recommendationTypeId": "1b4dd958-c202-47af-af97-99bfc98376a5",
            "shortDescription": {
                "problem": "Delete Public IP address not associated to a running Azure resource",
                "solution": "Delete Public IP address not associated to a running Azure resource"
            },
            "extendedProperties": {}
        },
        "id": "xxx",
        "type": "Microsoft.Advisor/recommendations",
        "name": "xxx"
    },
    {
        "properties": {
            "category": "Cost",
            "impact": "Medium",
            "impactedField": "Microsoft.Sql/servers/databases",
            "impactedValue": "bar",
            "lastUpdated": "2020-03-20T13:27:35.8394386Z",
            "recommendationTypeId": "b83241d3-47ba-4603-8d5a-a1b3331e74f4",
            "shortDescription": {
                "problem": "Right-size underutilized SQL Databases",
                "solution": "Right-size underutilized SQL Databases"
            },
            "extendedProperties": {
                "ServerName": "fooserver",
                "DatabaseName": "fooDB",
                "IsInReplication": "1",
                "ResourceGroup": "xyz",
                "DatabaseSize": "6",
                "Region": "East US 2",
                "ObservationPeriodStartDate": "03/04/2020 00:00:00",
                "ObservationPeriodEndDate": "03/19/2020 00:00:00",
                "Recommended_DTU": "10",
                "Recommended_SKU": "S0",
                "HasRecommendation": "true"
            }
        }
    }
]
Bhargavi Annadevara
  • 4,923
  • 2
  • 13
  • 30