{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kontaktio/main/json-schema/kontaktio-occupancy-room-history-schema.json",
  "title": "Occupancy-Room-History",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kontaktio-occupancy-room-api-openapi.yml#/components/schemas/Occupancy-Room-History",
  "type": "object",
  "properties": {
    "content": {
      "type": "array",
      "uniqueItems": true,
      "minItems": 0,
      "items": {
        "type": "object",
        "properties": {
          "startTime": {
            "type": "string",
            "minLength": 1,
            "description": "Time when given occupancy started."
          },
          "endTime": {
            "type": "string",
            "minLength": 1,
            "description": "Time when given occupancy ended."
          },
          "occupancy": {
            "type": "number",
            "description": "Number of people detected in the given time range."
          },
          "roomId": {
            "type": "number",
            "description": "ID of Room in which occupancy was calculated."
          },
          "roomName": {
            "type": "string",
            "minLength": 1,
            "description": "Name of Room in which occupancy was calculated."
          },
          "floorId": {
            "type": "number",
            "description": "ID of the Floor in which occupancy was calculated."
          },
          "floorName": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the Floor in which occupancy was calculated. JL Floor ID where room is located."
          },
          "buildingId": {
            "type": "number",
            "description": "ID of the Building in which occupancy was calculated."
          },
          "buildingName": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the Building in which occupancy was calculated."
          },
          "campusId": {
            "type": "number",
            "description": "ID of the Campus in which occupancy was calculated."
          },
          "campusName": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the Campus in which occupancy was calculated."
          }
        },
        "required": [
          "startTime",
          "endTime",
          "occupancy",
          "roomId"
        ]
      }
    }
  }
}