{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-advisor/json-schema/microsoft-azure-advisor-advisor-score-response-schema.json",
  "title": "AdvisorScoreResponse",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-advisor-advisorscoreentities-api-openapi.yml#/components/schemas/AdvisorScoreResponse",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The list of operations.",
      "items": {
        "$ref": "#/$defs/advisorScoreEntity"
      }
    }
  },
  "$defs": {
    "AdvisorScoreEntityProperties": {
      "type": "object",
      "description": "The Advisor score data.",
      "properties": {
        "lastRefreshedScore": {
          "$ref": "#/$defs/ScoreEntity",
          "description": "The details of latest available score."
        },
        "timeSeries": {
          "type": "array",
          "description": "The historic Advisor score data.",
          "items": {
            "$ref": "#/$defs/TimeSeriesEntity"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "Aggregated": {
      "type": "string",
      "description": "The aggregation level of the score.",
      "enum": [
        "week",
        "day",
        "month"
      ],
      "x-ms-enum": {
        "name": "Aggregated",
        "modelAsString": true,
        "values": [
          {
            "name": "week",
            "value": "week"
          },
          {
            "name": "day",
            "value": "day"
          },
          {
            "name": "month",
            "value": "month"
          }
        ]
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "type": "object",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "ScoreEntity": {
      "type": "object",
      "description": "The details of Advisor Score",
      "properties": {
        "date": {
          "type": "string",
          "description": "The date score was calculated."
        },
        "score": {
          "type": "number",
          "format": "float",
          "description": "The percentage score."
        },
        "consumptionUnits": {
          "type": "number",
          "format": "float",
          "description": "The consumption units for the score."
        },
        "impactedResourceCount": {
          "type": "number",
          "format": "float",
          "description": "The number of impacted resources."
        },
        "potentialScoreIncrease": {
          "type": "number",
          "format": "float",
          "description": "The potential percentage increase in overall score at subscription level once all recommendations in this scope are implemented."
        },
        "categoryCount": {
          "type": "number",
          "format": "float",
          "description": "The count of impacted categories.",
          "readOnly": true
        }
      }
    },
    "TimeSeriesEntity": {
      "type": "object",
      "description": "The historic data at different aggregation levels.",
      "properties": {
        "aggregationLevel": {
          "$ref": "#/$defs/Aggregated",
          "description": "The aggregation level of the score."
        },
        "scoreHistory": {
          "type": "array",
          "description": "The past score data",
          "items": {
            "$ref": "#/$defs/ScoreEntity"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "advisorScoreEntity": {
      "type": "object",
      "description": "The details of Advisor score for a single category.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/AdvisorScoreEntityProperties",
          "description": "The Advisor score data.",
          "x-ms-client-flatten": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    }
  }
}