{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "items": {
            "type": "array",
            "items": {
                "title": "Audit Log",
                "description": "Schema for a single Audit Log entry",
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "auditLogId": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "creationDate": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "orgId": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "primaryTargetId": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "primaryTargetType": {
                        "type": "string",
                        "enum": [
                            "Application",
                            "Dashboard",
                            "OrgInvite"
                        ]
                    },
                    "primaryTargetName": {
                        "type": "string",
                        "maxLength": 1024
                    },
                    "secondaryTargetId": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "secondaryTargetType": {
                        "type": "string",
                        "enum": [
                            "ApiToken",
                            "ApplicationKey",
                            "DataTable",
                            "Device",
                            "DeviceRecipe",
                            "Event",
                            "ExperienceDomain",
                            "ExperienceEndpoint",
                            "ExperienceGroup",
                            "ExperienceSlug",
                            "ExperienceUser",
                            "ExperienceVersion",
                            "ExperienceView",
                            "File",
                            "Flow",
                            "Integration",
                            "Webhook"
                        ]
                    },
                    "secondaryTargetName": {
                        "type": "string",
                        "maxLength": 1024
                    },
                    "actorId": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "actorType": {
                        "type": "string",
                        "enum": [
                            "Application",
                            "Device",
                            "Flow",
                            "User",
                            "ApiToken"
                        ]
                    },
                    "actorName": {
                        "type": "string",
                        "maxLength": 1024
                    },
                    "requestResource": {
                        "type": "string",
                        "maxLength": 1024
                    },
                    "requestAction": {
                        "type": "string",
                        "maxLength": 1024
                    },
                    "requestQueryParams": {
                        "type": "object"
                    },
                    "requestBody": {
                        "type": "object"
                    },
                    "requestPathParams": {
                        "type": "object"
                    },
                    "responseBody": {
                        "type": "object"
                    },
                    "responseStatus": {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 599
                    }
                }
            }
        },
        "count": {
            "type": "integer"
        },
        "totalCount": {
            "type": "integer"
        },
        "perPage": {
            "type": "integer"
        },
        "page": {
            "type": "integer"
        },
        "sortField": {
            "type": "string"
        },
        "sortDirection": {
            "type": "string",
            "enum": [
                "asc",
                "desc",
                "ASC",
                "DESC",
                ""
            ]
        },
        "orgId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        }
    }
}