{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/foundational/json-schema/foundational-monitor-preview-result-schema.json",
  "title": "MonitorPreviewResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/foundational-monitors-api-openapi.yml#/components/schemas/MonitorPreviewResult",
  "properties": {
    "executedAs": {
      "type": "string",
      "title": "Executedas",
      "description": "The connector the queries ran as, and its role or user where known."
    },
    "columns": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Columns",
      "default": []
    },
    "sampleRows": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Samplerows",
      "default": []
    },
    "sampleQuery": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Samplequery"
    },
    "metricsQuery": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metricsquery"
    },
    "checkValues": {
      "additionalProperties": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "type": "object",
      "title": "Checkvalues",
      "description": "Each check's value, keyed `<column>.<metric>` (plus the segment when segmented).",
      "default": {}
    },
    "rowsReturned": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rowsreturned",
      "description": "Rows of the target the checks saw."
    },
    "nullMetrics": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Nullmetrics",
      "description": "Checks that came back NULL, named `<column>.<metric>`.",
      "default": []
    },
    "returnedNoData": {
      "type": "boolean",
      "title": "Returnednodata",
      "description": "No rows, or NULL for every check.",
      "default": false
    },
    "durationMs": {
      "type": "integer",
      "title": "Durationms"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error",
      "description": "The warehouse's error, when a query failed."
    }
  },
  "type": "object",
  "required": [
    "executedAs",
    "durationMs"
  ]
}