{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getuptimely-com/json-schema/getuptimely-com-monitor-config-import-result-schema.json",
  "title": "MonitorConfigImportResult",
  "description": "The plan for, or the result of, importing a config document.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getuptimely-com-openapi.json#/components/schemas/MonitorConfigImportResult",
  "type": "object",
  "properties": {
    "dry_run": {
      "type": "boolean",
      "description": "True when nothing was written and the counts describe what an apply WOULD do."
    },
    "created_count": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Monitors created — or, in a dry run, the number that would be."
    },
    "skipped_count": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Entries skipped because a live monitor already has that name and type."
    },
    "invalid_count": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Entries that cannot describe a monitor."
    },
    "failed_count": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Entries whose creation was attempted and errored. Always 0 in a dry run."
    },
    "unmatched_labels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Label names the document referenced that this project does not have. They are reported, never created — inventing labels during an import would quietly reshape the destination project's taxonomy."
    },
    "entries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MonitorConfigImportEntry"
      },
      "description": "Per-entry outcomes, in the order they were considered."
    }
  },
  "required": [
    "dry_run",
    "created_count",
    "skipped_count",
    "invalid_count",
    "failed_count",
    "unmatched_labels",
    "entries"
  ],
  "additionalProperties": false,
  "$defs": {
    "MonitorConfigImportEntry": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The entry's name, as supplied."
        },
        "monitor_type": {
          "type": "string",
          "description": "The entry's type, as supplied."
        },
        "outcome": {
          "type": "string",
          "enum": [
            "create",
            "created",
            "skipped_duplicate",
            "invalid",
            "failed"
          ],
          "description": "`create` (dry run: would be created) · `created` (applied) · `skipped_duplicate` (a live monitor already has this name and type) · `invalid` (the entry cannot describe a monitor — see `reason`) · `failed` (the create was attempted and errored)."
        },
        "reason": {
          "description": "Why, in plain language, for every outcome but `create`/`created`. On `create`/`created` it is null, or — for a Server or Incoming Request monitor — the setup step the new monitor still needs: it is minted a new key, so the machine or job that reported to the exported monitor must be pointed at it before its first window ends.",
          "type": [
            "string",
            "null"
          ]
        },
        "monitor_id": {
          "description": "Id of the monitor created for this entry, when one was.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "monitor_type",
        "outcome",
        "reason",
        "monitor_id"
      ],
      "additionalProperties": false,
      "description": "The outcome of one entry in an import."
    }
  }
}