{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/riveterhq-com/json-schema/riveterhq-com-monitor-schema.json",
  "title": "Monitor",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/riveterhq-com-openapi.json#/components/schemas/Monitor",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Monitor id (mon_...)"
    },
    "name": {
      "type": "string"
    },
    "enabled": {
      "type": "boolean"
    },
    "cadence": {
      "type": "string",
      "enum": [
        "daily",
        "weekly",
        "monthly"
      ]
    },
    "minute": {
      "type": "integer"
    },
    "hour": {
      "type": "integer"
    },
    "day_of_week": {
      "type": [
        "integer",
        "null"
      ]
    },
    "day_of_month": {
      "type": [
        "integer",
        "null"
      ]
    },
    "timezone": {
      "type": "string"
    },
    "webhook_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "alert_rule": {
      "type": "string",
      "enum": [
        "each_run",
        "on_diff",
        "disabled"
      ]
    },
    "output_format": {
      "type": "string",
      "enum": [
        "current_only",
        "include_diffs"
      ]
    },
    "next_run_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "schedule_summary": {
      "type": "string",
      "description": "Human-readable schedule (e.g. \"Daily at 9:00 UTC\")"
    },
    "dataset_id": {
      "type": "string",
      "description": "The dataset each run fills (ds_...)"
    },
    "dataset_name": {
      "type": "string",
      "description": "The dataset's name"
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The output column names each run fills (every one when absent)"
    },
    "enrichment_id": {
      "type": "string",
      "description": "The dataset's enrichment, or the legacy enrichment the monitor runs"
    },
    "enrichment_name": {
      "type": "string",
      "description": "Monitors on a legacy enrichment only"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "has_input": {
      "type": "boolean",
      "description": "Monitors on a legacy enrichment only — whether the monitor carries fixed input data"
    },
    "legacy": {
      "oneOf": [
        {
          "type": "boolean",
          "description": "`true` on an item of GET /monitors whose monitor runs a legacy enrichment"
        },
        {
          "$ref": "#/$defs/LegacyNotice"
        }
      ],
      "description": "On GET / PATCH / POST of a monitor on a legacy enrichment, the notice; on its item in GET /monitors, `true`"
    }
  },
  "$defs": {
    "LegacyNotice": {
      "type": "object",
      "description": "Present on a response when the request took a legacy mode — a legacy enrichment's id on `/enrich`,\n`/enrichments/{id}`, `/monitors`, or `GET /runs`; a monitor on a legacy enrichment; an `output` column\nwith legacy-pipeline fields on `/enrich`; the list-build body on `POST /datasets`. The response also\ncarries `Deprecation: true` and a `Link` header (`rel=\"successor-version\"`). The legacy generation is\ndocumented in [the legacy API docs](?spec=legacy).\n",
      "properties": {
        "notice": {
          "type": "string",
          "description": "One or two sentences — what was legacy about the request and what to send instead"
        },
        "successor": {
          "type": "string",
          "description": "`METHOD /v1/path` of the current operation to use"
        },
        "docs": {
          "type": "string",
          "format": "uri",
          "description": "The successor's section of this reference"
        }
      },
      "required": [
        "notice",
        "successor",
        "docs"
      ]
    }
  }
}