{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/acronis/main/json-schema/acronis-get-events-response-schema.json",
  "title": "GetEventsResponse",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acronis-events-api-openapi.yml#/components/schemas/GetEventsResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "offset",
    "events"
  ],
  "properties": {
    "offset": {
      "description": "Latest offset of the subscriber. This is the offset that should be used in the next poll request.",
      "type": "integer",
      "format": "int64"
    },
    "events": {
      "description": "A batch of events starting from the cursor position for each partition.",
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/$defs/Event"
      }
    }
  },
  "$defs": {
    "Event": {
      "description": "Defines the structure of the event that has occurred.\nEvents will contain two types of information: the event data representing the occurrence and context metadata providing contextual information about the occurrence. A single occurrence may result in more than one event.\nEvents are limited to a maximum size of 64KB, which includes both headers and payload.\n",
      "x-cti.cti": [
        "cti.a.p.em.event.v1.0",
        "cti.a.p.em.msg.v1.0"
      ],
      "x-cti.final": false,
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "type",
        "time",
        "source",
        "tenant_id"
      ],
      "properties": {
        "id": {
          "description": "Immutable, producer-generated identifier of this event instance.  While a randomly generated UUID or a similar mechanism is recommended for system-wide uniqueness, it is not possible to guarantee that no other producer will generate the same ID.\nUniqueness scope - Strongly RECOMMENDED to be a randomly generated UUIDv4 so collisions across producers are practically negligible. - Consumers and downstream services MAY assume uniqueness of `id` within the scope of `(type, id)`. \n  However a better alternative is `(sequence, type)` combination for persistent topics.\n\nGeneration rules - MUST be assigned by the producer when the event is created and MUST NOT change thereafter. - MUST NOT be the nil UUID (`00000000-0000-0000-0000-000000000000`) and MUST NOT be empty. - SHOULD be lowercase canonical UUID text with hyphens.\n",
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
        },
        "type": {
          "description": "The specific event type.",
          "x-cti.id": true,
          "type": "string",
          "pattern": "^cti\\.([a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*\\.[a-z_][a-z0-9_.]*\\.v[\\d]+\\.[\\d]+)(~([a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*\\.[a-z_][a-z0-9_.]*\\.v[\\d]+\\.[\\d]+))*(~[0-9a-f]{8}\\b-[0-9a-f]{4}\\b-[0-9a-f]{4}\\b-[0-9a-f]{4}\\b-[0-9a-f]{12})?$",
          "maxLength": 1024
        },
        "time": {
          "description": "Precise time when event has occurred. The time is set by the producer and may be set as past or future time. The time should be in UTC and formatted as ISO 8601.\n",
          "type": "string",
          "format": "date-time"
        },
        "ingest_time": {
          "description": "Time when the event was received by Event Manager and fully controlled by the Event Manager. The time should be in UTC and formatted as ISO 8601.\n",
          "x-apis.writeable": false,
          "type": "string",
          "format": "date-time"
        },
        "previous": {
          "description": "Identifies the sequence number of the directly preceding event in the ordered topic stream. This field is used to explicitly link events in sequence, facilitating tracking of event order and detection of any missing events.\nThis field is optional for unordered topics (e.g. topic.ordering == NONE)\n",
          "type": "integer",
          "format": "int64"
        },
        "sequence": {
          "description": "A unique identifier that represents the position of this event within the overall event stream. This sequence number is crucial for maintaining the order of events within ordered topics.\nIn 'PRODUCER' ordering mode, this number is assigned by the event producer.\nIn 'EVENTMANAGER' ordering mode, this number is assigned by the event manager.\nThis field is optional for unordered topics (e.g. topic.ordering == NONE)\n",
          "type": "integer",
          "format": "int64"
        },
        "source": {
          "description": "The source that produced the event, specified by type and ID. It can be any context filled by Producer.\nThis field is not being processed by Event Manager and it's up to Producer to define what to be specified in the source field.\nThis field could be used for debugging purposes or as additional information for Consumer\n",
          "type": "string",
          "maxLength": 1024
        },
        "subject": {
          "description": "ID of the specific object where event (e.g. state change notification) happened. For example, it can be a task id in the cti.a.p.em.event.v1.0~a.p.task.created.v1.0 event\nIt can be omitted for cases where the event is not related to a specific object.\n",
          "x-cti.overridable": true,
          "type": "string",
          "maxLength": 1024
        },
        "subject_type": {
          "description": "CTI type of the subject. Required to provide granular access to events associated with specific subject type.\nIf `allowed_subject_types` is defined for event type field value should represent same or derived CTI type.\n",
          "x-cti.reference": true,
          "x-cti.overridable": true,
          "type": "string",
          "pattern": "^cti\\.([a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*\\.[a-z_][a-z0-9_.]*\\.v[\\d]+\\.[\\d]+)(~([a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*\\.[a-z_][a-z0-9_.]*\\.v[\\d]+\\.[\\d]+))*(~[0-9a-f]{8}\\b-[0-9a-f]{4}\\b-[0-9a-f]{4}\\b-[0-9a-f]{4}\\b-[0-9a-f]{12})?$",
          "maxLength": 1024
        },
        "tenant_id": {
          "description": "Acronis tenant ID that generated the event",
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
        },
        "client_id": {
          "description": "Acronis API client ID (or Agent ID) that generated the event. Can be used to isolate events for different agents or clients",
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
        },
        "trace_parent": {
          "description": "ID of event which caused this event to connect event reactions. Typically this uuid should reference to parent event id",
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
        },
        "data_ref": {
          "description": "Payload data stored in some external place, i.e. to impose additional authorization, would be identical content to data",
          "type": "string",
          "maxLength": 1024
        },
        "data": {}
      }
    }
  }
}