{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-purview/json-schema/microsoft-purview-policy-events-response-updated-schema.json",
  "title": "PolicyEventsResponseUpdated",
  "description": "Response model for policy delta fetch API.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-purview-policyevents-api-openapi.yml#/components/schemas/PolicyEventsResponseUpdated",
  "required": [
    "syncToken"
  ],
  "type": "object",
  "properties": {
    "syncToken": {
      "description": "This sync token represents the latest checkpoint for policies. Client need to pass this value while fetching subsequent delta changes.",
      "minLength": 1,
      "type": "string"
    },
    "value": {
      "description": "List of policy elements.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/PolicyElementEventModelUpdated"
      }
    }
  },
  "$defs": {
    "PolicyElementEventModelUpdated": {
      "description": "Represents the policy element event model.",
      "required": [
        "eventType",
        "id",
        "kind",
        "updatedAt",
        "version"
      ],
      "type": "object",
      "properties": {
        "id": {
          "description": "Id of the policy element.",
          "minLength": 1,
          "type": "string"
        },
        "scopes": {
          "description": "List of scopes included in this policy.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "version": {
          "format": "int64",
          "description": "Current version of policy element. This is auto incremented with each change. Starts with 1.",
          "type": "integer"
        },
        "elementJson": {
          "description": "Policy element serialized json payload.",
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/PolicyElementKind"
        },
        "updatedAt": {
          "format": "date-time",
          "description": "Time at which this policy element was last updated.",
          "type": "string"
        },
        "eventType": {
          "description": "Type of event. Format: <RP-Name>/<Resource-Type>/<Action>. For Example: Microsoft.Purview/PolicyElements/Delete.",
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "PolicyElementKind": {
      "description": "Represents the kind of policy element.",
      "enum": [
        "Policy",
        "PolicySet",
        "AttributeRule"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "PolicyElementKind",
        "modelAsString": true
      }
    }
  }
}