{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ploid/json-schema/ploid-monitor-run-schema.json",
  "title": "MonitorRun",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ploid-monitors-api-openapi.yml#/components/schemas/MonitorRun",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "monitor_run"
    },
    "id": {
      "type": "string"
    },
    "monitor_id": {
      "type": "string"
    },
    "trigger": {
      "type": "string",
      "enum": [
        "baseline",
        "schedule",
        "manual"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "completed",
        "failed",
        "skipped"
      ],
      "description": "`skipped` means available ACU or the API-key budget could not cover the run; `error` explains which."
    },
    "candidates": {
      "type": "integer"
    },
    "items_emitted": {
      "type": "integer"
    },
    "acu_charged": {
      "type": "number"
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "started_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}