{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/monit-rs/json-schema/monit-rs-incident-detail-response-schema.json",
  "title": "IncidentDetailResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/monit-rs-openapi.json#/components/schemas/IncidentDetailResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "title": "User Id"
    },
    "endpoint_id": {
      "type": "string",
      "format": "uuid",
      "title": "Endpoint Id"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "severity": {
      "type": "string",
      "title": "Severity"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "summary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Summary"
    },
    "regression_count": {
      "type": "integer",
      "title": "Regression Count"
    },
    "first_detected_at": {
      "type": "string",
      "format": "date-time",
      "title": "First Detected At"
    },
    "last_detected_at": {
      "type": "string",
      "format": "date-time",
      "title": "Last Detected At"
    },
    "acknowledged_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Acknowledged At"
    },
    "acknowledged_by_user_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Acknowledged By User Id"
    },
    "resolved_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolved At"
    },
    "resolved_by_user_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolved By User Id"
    },
    "opened_alert_sent_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Opened Alert Sent At"
    },
    "last_alerted_severity": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Alerted Severity"
    },
    "recovery_alert_sent_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Recovery Alert Sent At"
    },
    "escalation_policy_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Escalation Policy Id"
    },
    "assigned_to_user_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assigned To User Id"
    },
    "assigned_contact": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assigned Contact"
    },
    "assigned_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assigned At"
    },
    "assigned_by_user_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assigned By User Id"
    },
    "escalation_status": {
      "type": "string",
      "title": "Escalation Status",
      "default": "pending"
    },
    "current_escalation_step": {
      "type": "integer",
      "title": "Current Escalation Step",
      "default": 0
    },
    "next_escalation_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Escalation At"
    },
    "last_escalated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Escalated At"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updated At"
    },
    "endpoint": {
      "anyOf": [
        {
          "$ref": "#/$defs/IncidentEndpointSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "regressions": {
      "items": {
        "$ref": "#/$defs/IncidentRegressionSummary"
      },
      "type": "array",
      "title": "Regressions"
    },
    "timeline": {
      "items": {
        "$ref": "#/$defs/IncidentTimelineEventResponse"
      },
      "type": "array",
      "title": "Timeline"
    },
    "regressions_truncated": {
      "type": "boolean",
      "title": "Regressions Truncated",
      "default": false
    },
    "timeline_truncated": {
      "type": "boolean",
      "title": "Timeline Truncated",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "id",
    "user_id",
    "endpoint_id",
    "status",
    "severity",
    "title",
    "summary",
    "regression_count",
    "first_detected_at",
    "last_detected_at",
    "acknowledged_at",
    "acknowledged_by_user_id",
    "resolved_at",
    "resolved_by_user_id",
    "created_at"
  ],
  "$defs": {
    "IncidentEndpointSummary": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "url": {
          "type": "string",
          "title": "Url"
        },
        "method": {
          "type": "string",
          "title": "Method"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "url",
        "method"
      ],
      "title": "IncidentEndpointSummary"
    },
    "IncidentRegressionSummary": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "endpoint_id": {
          "type": "string",
          "format": "uuid",
          "title": "Endpoint Id"
        },
        "regression_type": {
          "type": "string",
          "title": "Regression Type"
        },
        "severity": {
          "type": "string",
          "title": "Severity"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "is_acknowledged": {
          "type": "boolean",
          "title": "Is Acknowledged"
        },
        "is_resolved": {
          "type": "boolean",
          "title": "Is Resolved"
        },
        "resolved_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Resolved At"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "endpoint_id",
        "regression_type",
        "severity",
        "description",
        "is_acknowledged",
        "is_resolved",
        "resolved_at",
        "created_at"
      ],
      "title": "IncidentRegressionSummary"
    },
    "IncidentTimelineEventResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "incident_id": {
          "type": "string",
          "format": "uuid",
          "title": "Incident Id"
        },
        "regression_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Regression Id"
        },
        "actor_user_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actor User Id"
        },
        "event_type": {
          "type": "string",
          "title": "Event Type"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Message"
        },
        "metadata": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Metadata"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "incident_id",
        "regression_id",
        "actor_user_id",
        "event_type",
        "message",
        "created_at"
      ],
      "title": "IncidentTimelineEventResponse"
    }
  }
}