{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/miro/json-schema/miro-audit-page-schema.json",
  "title": "AuditPage",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/miro-audit-logs-api-openapi.yml#/components/schemas/AuditPage",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "Type of the response, in this case it's always 'cursor-list'"
    },
    "limit": {
      "type": "integer",
      "description": "Page limit"
    },
    "size": {
      "type": "integer",
      "description": "Item count in current page"
    },
    "cursor": {
      "type": "string",
      "description": "The key that should be used as the cursor request parameter to fetch the next page"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AuditEvent"
      },
      "description": "Audit events list"
    }
  },
  "$defs": {
    "AuditContext": {
      "type": "object",
      "description": "Audit context",
      "properties": {
        "ip": {
          "type": "string",
          "description": "Ip address associated with the audit context"
        },
        "team": {
          "$ref": "#/$defs/AuditTeam"
        },
        "organization": {
          "$ref": "#/$defs/AuditOrganization"
        }
      }
    },
    "AuditCreatedBy": {
      "type": "object",
      "description": "The details regarding the creator of the audit event",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of the creator",
          "enum": [
            "user",
            "application",
            "scim_provisioner",
            "miro_automation"
          ]
        },
        "id": {
          "type": "string",
          "description": "Id of the creator"
        },
        "name": {
          "type": "string",
          "description": "Name of the creator"
        },
        "email": {
          "type": "string",
          "description": "Email of the creator"
        }
      }
    },
    "AuditEvent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Audit event id"
        },
        "context": {
          "$ref": "#/$defs/AuditContext"
        },
        "object": {
          "$ref": "#/$defs/AuditObject"
        },
        "createdAt": {
          "type": "string",
          "description": "Time when the audit event has been created",
          "format": "date-time"
        },
        "details": {
          "type": "object",
          "description": "Details json related to the audit event"
        },
        "createdBy": {
          "$ref": "#/$defs/AuditCreatedBy"
        },
        "event": {
          "type": "string",
          "description": "Event type of the audit event"
        },
        "category": {
          "type": "string",
          "description": "Event category of the audit event."
        }
      }
    },
    "AuditObject": {
      "type": "object",
      "description": "The object related with the audit event",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the object"
        },
        "name": {
          "type": "string",
          "description": "Name of the object"
        }
      }
    },
    "AuditOrganization": {
      "type": "object",
      "description": "Organization associated with the audit context",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the organization"
        },
        "name": {
          "type": "string",
          "description": "Name of the organization"
        }
      }
    },
    "AuditTeam": {
      "type": "object",
      "description": "Team associated with the audit context",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the team"
        },
        "name": {
          "type": "string",
          "description": "Name of the team"
        }
      }
    }
  }
}