{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/power-bi/json-schema/power-bi-goal-refresh-histories-schema.json",
  "title": "GoalRefreshHistories",
  "description": "The OData response wrapper for a collection of Power BI goal refresh history entries",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/power-bi-goals-preview-api-openapi.yml#/components/schemas/GoalRefreshHistories",
  "properties": {
    "@odata.context": {
      "type": "string",
      "description": "OData context"
    },
    "value": {
      "type": "array",
      "description": "The goal refresh history entries",
      "items": {
        "$ref": "#/$defs/GoalRefreshHistory"
      }
    }
  },
  "$defs": {
    "GoalRefreshHistory": {
      "description": "A refresh history entry for a Power BI goal",
      "properties": {
        "goalId": {
          "description": "The goal ID",
          "type": "string",
          "format": "uuid"
        },
        "connectionType": {
          "description": "The refresh connection type",
          "type": "string",
          "enum": [
            "Current",
            "Target",
            "Status"
          ],
          "x-ms-enum": {
            "name": "GoalValueType",
            "modelAsExtensible": true,
            "modelAsString": false,
            "values": [
              {
                "value": "Current",
                "description": "Information about the current value of the goal",
                "name": "Current"
              },
              {
                "value": "Target",
                "description": "Information about the target value of the goal",
                "name": "Target"
              },
              {
                "value": "Status",
                "description": "Information about the status of the goal",
                "name": "Status"
              }
            ]
          }
        },
        "status": {
          "description": "The status of the refresh processing.",
          "type": "string",
          "enum": [
            "NotProcessed",
            "Succeeded",
            "Failed",
            "UserNotFound",
            "QueryExecutionError",
            "QueryResultError",
            "BadQueryResultMetadata",
            "EmptyGoalValues",
            "ConnectedDatasetDeleted",
            "UserNotAuthorized",
            "ModelNotFound",
            "ScorecardNotFound"
          ],
          "x-ms-enum": {
            "name": "GoalProcessingStatus",
            "modelAsExtensible": true,
            "modelAsString": false,
            "values": [
              {
                "value": "NotProcessed",
                "description": "Not processed",
                "name": "NotProcessed"
              },
              {
                "value": "Succeeded",
                "description": "Succeeded",
                "name": "Succeeded"
              },
              {
                "value": "Failed",
                "description": "Failed",
                "name": "Failed"
              },
              {
                "value": "UserNotFound",
                "description": "User not found",
                "name": "UserNotFound"
              },
              {
                "value": "QueryExecutionError",
                "description": "Query execution error",
                "name": "QueryExecutionError"
              },
              {
                "value": "QueryResultError",
                "description": "Query result error",
                "name": "QueryResultError"
              },
              {
                "value": "BadQueryResultMetadata",
                "description": "Bad query result metadata",
                "name": "BadQueryResultMetadata"
              },
              {
                "value": "EmptyGoalValues",
                "description": "Empty goal values",
                "name": "EmptyGoalValues"
              },
              {
                "value": "ConnectedDatasetDeleted",
                "description": "Connected dataset deleted",
                "name": "ConnectedDatasetDeleted"
              },
              {
                "value": "UserNotAuthorized",
                "description": "User not authorized",
                "name": "UserNotAuthorized"
              },
              {
                "value": "ModelNotFound",
                "description": "Model not found",
                "name": "ModelNotFound"
              },
              {
                "value": "ScorecardNotFound",
                "description": "Scorecard not found",
                "name": "ScorecardNotFound"
              }
            ]
          }
        },
        "timestamp": {
          "description": "The UTC timestamp of the refresh operation",
          "type": "string",
          "format": "date-time"
        },
        "rootActivityId": {
          "description": "The root activity ID",
          "type": "string",
          "format": "uuid"
        },
        "message": {
          "description": "The verbal description of the status of the refresh operation",
          "type": "string"
        }
      }
    }
  }
}