{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/avala-ai/json-schema/avala-ai-event-create-schema.json",
  "title": "EventCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avala-ai-fleet-api-openapi.yml#/components/schemas/EventCreate",
  "required": [
    "recording",
    "device",
    "type",
    "label",
    "timestamp"
  ],
  "type": "object",
  "properties": {
    "uid": {
      "title": "Uid",
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "recording": {
      "title": "Recording",
      "type": "string",
      "format": "uuid"
    },
    "device": {
      "title": "Device",
      "type": "string",
      "format": "uuid"
    },
    "type": {
      "title": "Type",
      "type": "string",
      "enum": [
        "error",
        "warning",
        "info",
        "state_change",
        "anomaly",
        "custom"
      ]
    },
    "label": {
      "title": "Label",
      "type": "string",
      "maxLength": 255,
      "minLength": 1
    },
    "description": {
      "title": "Description",
      "type": "string"
    },
    "timestamp": {
      "title": "Timestamp",
      "type": "string",
      "format": "date-time"
    },
    "duration_ms": {
      "title": "Duration ms",
      "type": [
        "integer",
        "null"
      ],
      "maximum": 2147483647,
      "minimum": -2147483648
    },
    "tags": {
      "type": "array",
      "items": {
        "title": "Tags",
        "type": "string",
        "maxLength": 100,
        "minLength": 1
      }
    },
    "metadata": {
      "title": "Metadata",
      "type": "object"
    },
    "severity": {
      "title": "Severity",
      "type": "string",
      "enum": [
        "info",
        "warning",
        "error",
        "critical"
      ]
    },
    "created_at": {
      "title": "Created at",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated_at": {
      "title": "Updated at",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  }
}