{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/secure-flows-com/json-schema/secure-flows-com-api-access-log-page-response-schema.json",
  "title": "ApiAccessLogPageResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/secure-flows-com-audit-api-openapi.yml#/components/schemas/ApiAccessLogPageResponse",
  "type": "object",
  "required": [
    "items",
    "page",
    "pageSize",
    "totalItems",
    "totalPages"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ApiAccessLogView"
      }
    },
    "page": {
      "type": "integer"
    },
    "pageSize": {
      "type": "integer"
    },
    "totalItems": {
      "type": "integer",
      "format": "int64"
    },
    "totalPages": {
      "type": "integer"
    }
  },
  "$defs": {
    "ApiAccessLogView": {
      "type": "object",
      "required": [
        "id",
        "occurredAt",
        "httpMethod",
        "endpoint",
        "httpStatus",
        "durationMs"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "occurredAt": {
          "type": "string",
          "format": "date-time"
        },
        "httpMethod": {
          "type": "string"
        },
        "endpoint": {
          "type": "string"
        },
        "httpStatus": {
          "type": "integer"
        },
        "durationMs": {
          "type": "integer",
          "format": "int64"
        },
        "sessionId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "tokenRevision": {
          "type": [
            "integer",
            "null"
          ]
        },
        "userFirebaseId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Firebase UID when email is unavailable"
        },
        "userEmail": {
          "type": [
            "string",
            "null"
          ],
          "description": "Prefer for display; enriched from user row or session owner"
        },
        "applicationId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Client app id when known"
        },
        "clientIp": {
          "type": [
            "string",
            "null"
          ]
        },
        "userAgent": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}