{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cogram-com/json-schema/cogram-com-backup-run-v1-schema.json",
  "title": "BackupRunV1",
  "description": "A recorded backup lifecycle event.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cogram-com-backup-runs-api-openapi.yml#/components/schemas/BackupRunV1",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "event": {
      "$ref": "#/$defs/ConnectorBackupEvent"
    },
    "status": {
      "anyOf": [
        {
          "$ref": "#/$defs/ConnectorBackupStatus"
        },
        {
          "type": "null"
        }
      ]
    },
    "schedule_interval_hours": {
      "type": "integer",
      "title": "Schedule Interval Hours"
    },
    "projects_synced": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Projects Synced"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "event",
    "status",
    "schedule_interval_hours",
    "projects_synced",
    "error",
    "created_at"
  ],
  "$defs": {
    "ConnectorBackupEvent": {
      "type": "string",
      "enum": [
        "started",
        "finished"
      ],
      "title": "ConnectorBackupEvent",
      "description": "Lifecycle point a connector reports."
    },
    "ConnectorBackupStatus": {
      "type": "string",
      "enum": [
        "success",
        "failed"
      ],
      "title": "ConnectorBackupStatus",
      "description": "Outcome of a finished run. Absent on ``started`` events."
    }
  }
}