{
  "openapi": "3.0.0",
  "info": {
    "description": "# Authentication\n\nAll API requests are authenticated with a Hoxton **API key**, passed as a\nBearer token in the `Authorization` header of every request:\n\n```\nAuthorization: Bearer hxt_live_<prefix>.<secret>\n```\n\n## Creating an API key\n\nCreate and manage API keys for your organisation from your dashboard settings\nat [https://nexus.hoxton.ai/my-org/api-keys](https://nexus.hoxton.ai/my-org/api-keys), or\nprogrammatically via the `/api-keys` endpoints documented below.\n\nThe secret is shown **once**, at creation time — store it securely, as it\ncannot be retrieved afterwards. Each key belongs to a single organisation and\nis scoped to that organisation's data.\n\n## Using an API key\n\n```shell\ncurl https://nexus.hoxton.ai/api/v1/organisations \\\n  -H 'Authorization: Bearer hxt_live_<prefix>.<secret>'\n```\n\n## Expiry and revocation\n\nA key may be created with an optional expiry. Keys can be revoked at any time\nfrom the dashboard or via `DELETE /api-keys/{apiKeyId}`; a revoked or expired\nkey is rejected immediately on subsequent requests.\n",
    "license": {
      "name": "Proprietary",
      "url": "https://hoxton.ai"
    },
    "title": "HoxtonAi API",
    "version": "1.0.0",
    "x-logo": {
      "altText": "HoxtonAi",
      "url": "https://s3.eu-west-1.amazonaws.com/hoxton.ai/hoxtonai_logo.svg"
    }
  },
  "paths": {
    "/aggregated-api-request-metrics-reports": {
      "post": {
        "description": "Create a report of aggregated api request metrics for a given time range and list of organisations.",
        "operationId": "CreateAggregatedAPIRequestMetricsReport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AggregatedApiRequestMetricsReport"
              }
            }
          },
          "description": "request aggregated api request metrics data for a set of orgs and a given time range.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AggregatedApiRequestMetrics"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create aggregated api metrics report",
        "tags": [
          "report"
        ]
      }
    },
    "/aggregated-video-metrics-reports": {
      "post": {
        "description": "Create a report of aggregated camera metrics for a given time range and list of cameras.",
        "operationId": "CreateAggregatedVideoMetricsReport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AggregatedVideoMetricsReport"
              }
            }
          },
          "description": "request aggregated video metrics data for a set of cameras and a given time range.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AggregatedVideoMetrics"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create aggregated video metrics report",
        "tags": [
          "report"
        ]
      }
    },
    "/alert-camera-positions": {
      "delete": {
        "description": "Delete a link between an alert and a camera position.",
        "operationId": "DeleteAlertCameraPosition",
        "parameters": [
          {
            "description": "The ID of the alert whose link is being deleted.",
            "in": "query",
            "name": "alertId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the camera position being unlinked from the alert.",
            "in": "query",
            "name": "cameraPositionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Delete an alert camera position link",
        "tags": [
          "alertCameraPosition"
        ]
      },
      "get": {
        "description": "Get all available links between alerts and camera positions subject\nto filters.",
        "operationId": "ListAlertCameraPositions",
        "parameters": [
          {
            "description": "The ID of a camera linked to the alerts.",
            "in": "query",
            "name": "cameraId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of an alert being linked to the camera positions.",
            "in": "query",
            "name": "alertId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of a camera position linked to the alerts.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the notification group the linked alert notifies.",
            "in": "query",
            "name": "notificationGroupId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The type of the linked alert.",
            "in": "query",
            "name": "alertType",
            "schema": {
              "type": "string",
              "enum": [
                "offline_alert",
                "occupancy_alert",
                "camera_health_summary_alert"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertCameraPosition"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List alert camera position links",
        "tags": [
          "alertCameraPosition"
        ]
      },
      "put": {
        "description": "Create a link between an alert and a camera position.",
        "operationId": "PutAlertCameraPosition",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertCameraPosition"
              }
            }
          },
          "description": "The link between an alert and a camera position to store.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertCameraPosition"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create an alert camera position link",
        "tags": [
          "alertCameraPosition"
        ]
      }
    },
    "/alert-notification-groups": {
      "delete": {
        "description": "Delete a link between an alert and a notification group.",
        "operationId": "DeleteAlertNotificationGroup",
        "parameters": [
          {
            "description": "The ID of the alert whose link is being deleted.",
            "in": "query",
            "name": "alertId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the notification group being unlinked from the alert.",
            "in": "query",
            "name": "notificationGroupId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Delete an alert notification group link",
        "tags": [
          "alertNotificationGroup"
        ]
      },
      "get": {
        "description": "Get all available links between alerts and notification groups subject to filters.",
        "operationId": "ListAlertNotificationGroups",
        "parameters": [
          {
            "description": "The ID of a camera position linked to the alert.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the notification group the alerts are linked to.",
            "in": "query",
            "name": "notificationGroupId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the alert the notification groups are linked to.",
            "in": "query",
            "name": "alertId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the occupancy monitor the alert is linked to.",
            "in": "query",
            "name": "occupancyMonitorId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The type of the linked alert.",
            "in": "query",
            "name": "alertType",
            "schema": {
              "type": "string",
              "enum": [
                "offline_alert",
                "occupancy_alert",
                "camera_health_summary_alert"
              ]
            }
          },
          {
            "description": "the ID of the site the linked alert is part of.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertNotificationGroup"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List alert notification group links",
        "tags": [
          "alertNotificationGroup"
        ]
      },
      "put": {
        "description": "Create a link between an alert and a notification group.",
        "operationId": "PutAlertNotificationGroup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertNotificationGroup"
              }
            }
          },
          "description": "The link between an alert and a notification group to store.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertNotificationGroup"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create an alert notification group link",
        "tags": [
          "alertNotificationGroup"
        ]
      }
    },
    "/alert-occupancy-monitors": {
      "delete": {
        "description": "Delete a link between an alert and an occupancy monitor.",
        "operationId": "DeleteAlertOccupancyMonitor",
        "parameters": [
          {
            "description": "The ID of the alert whose link is being deleted.",
            "in": "query",
            "name": "alertId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the occupancy monitor being unlinked from the alert.",
            "in": "query",
            "name": "occupancyMonitorId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Delete an alert occupancy monitor link",
        "tags": [
          "alertOccupancyMonitor"
        ]
      },
      "get": {
        "description": "Get all links between alerts and occupancy monitors subject to filters.",
        "operationId": "ListAlertOccupancyMonitors",
        "parameters": [
          {
            "description": "the ID of the occupancy monitor the alert is linked to.",
            "in": "query",
            "name": "occupancyMonitorId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the alert the occupancy monitors are linked to.",
            "in": "query",
            "name": "alertId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the site the linked occupancy monitor is part of.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the organisation the linked alert is part of.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertOccupancyMonitor"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List alert occupancy monitor links",
        "tags": [
          "alertOccupancyMonitor"
        ]
      },
      "put": {
        "description": "Create a link between an alert and an occupancy monitor.",
        "operationId": "PutAlertOccupancyMonitor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertOccupancyMonitor"
              }
            }
          },
          "description": "The link between an alert and an occupancy monitor to store.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertOccupancyMonitor"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create an alert occupancy monitor link",
        "tags": [
          "alertOccupancyMonitor"
        ]
      }
    },
    "/alert-people-count-monitors": {
      "delete": {
        "description": "Delete a link between an alert and a people count monitor.",
        "operationId": "DeleteAlertPeopleCountMonitor",
        "parameters": [
          {
            "description": "The ID of the alert whose link is being deleted.",
            "in": "query",
            "name": "alertId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the people count monitor being unlinked from the alert.",
            "in": "query",
            "name": "peopleCountMonitorId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Delete an alert people count monitor link",
        "tags": [
          "alertPeopleCountMonitor"
        ]
      },
      "get": {
        "description": "Get all available links between alerts and people count monitors\nsubject to filters.",
        "operationId": "ListAlertPeopleCountMonitors",
        "parameters": [
          {
            "description": "The ID of an alert being linked to the monitors.",
            "in": "query",
            "name": "alertId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the site the linked people count monitor is part of.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of a people count monitor linked to the alerts.",
            "in": "query",
            "name": "peopleCountMonitorId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertPeopleCountMonitor"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List alert people count monitor links",
        "tags": [
          "alertPeopleCountMonitor"
        ]
      },
      "put": {
        "description": "Create a link between an alert and a people count monitor.",
        "operationId": "PutAlertPeopleCountMonitor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertPeopleCountMonitor"
              }
            }
          },
          "description": "The link between an alert and a people count monitor to store.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertPeopleCountMonitor"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create an alert people count monitor link",
        "tags": [
          "alertPeopleCountMonitor"
        ]
      }
    },
    "/alert-sites": {
      "delete": {
        "description": "Delete a link between an alert and a site.",
        "operationId": "DeleteAlertSite",
        "parameters": [
          {
            "description": "The ID of the alert whose link is being deleted.",
            "in": "query",
            "name": "alertId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the site being unlinked from the alert.",
            "in": "query",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Delete an alert site link",
        "tags": [
          "alertSite"
        ]
      },
      "get": {
        "description": "Get all links between alerts and sites subject to filters.",
        "operationId": "ListAlertSites",
        "parameters": [
          {
            "description": "The ID of the alert the sites are linked to.",
            "in": "query",
            "name": "alertId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of a site linked to the alerts.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertSite"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List alert site links",
        "tags": [
          "alertSite"
        ]
      },
      "put": {
        "description": "Create a link between an alert and a site.",
        "operationId": "PutAlertSite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertSite"
              }
            }
          },
          "description": "The link between an alert and a site to store.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertSite"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create an alert site link",
        "tags": [
          "alertSite"
        ]
      }
    },
    "/alerts": {
      "get": {
        "description": "Get all available alerts subject to filters.",
        "operationId": "ListAlerts",
        "parameters": [
          {
            "description": "The ID of a camera linked to the Alerts.",
            "in": "query",
            "name": "alertType",
            "schema": {
              "type": "string",
              "enum": [
                "offline_alert",
                "occupancy_alert",
                "camera_health_summary_alert"
              ]
            }
          },
          {
            "description": "The ID of a camera position linked to the alerts.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the notification group the alert are sent to.",
            "in": "query",
            "name": "notificationGroupId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated occupancy monitor.",
            "in": "query",
            "name": "occupancyMonitorId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated site.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Alert state.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Alert"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List alerts",
        "tags": [
          "alert"
        ]
      },
      "put": {
        "description": "Update an alert if it exists, create a new one otherwise.",
        "operationId": "PutAlert",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Alert"
              }
            }
          },
          "description": "The configuration for an alert to store.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Alert"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create/Update alert",
        "tags": [
          "alert"
        ]
      }
    },
    "/alerts/{alertId}": {
      "delete": {
        "description": "Delete an alert.",
        "operationId": "DeleteAlert",
        "parameters": [
          {
            "description": "The ID of the alert to be deleted.",
            "in": "path",
            "name": "alertId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Delete alert",
        "tags": [
          "alert"
        ]
      },
      "get": {
        "description": "Get an alert identified by its id.",
        "operationId": "GetAlert",
        "parameters": [
          {
            "description": "The ID of the alert to get.",
            "in": "path",
            "name": "alertId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Alert"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Get alert",
        "tags": [
          "alert"
        ]
      }
    },
    "/annotations": {
      "get": {
        "description": "Get all available annotations subject to filters.",
        "operationId": "ListAnnotations",
        "parameters": [
          {
            "description": "The ID of a camera position linked to the annotations.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the associated site.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "annotation state.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Annotation"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List annotations",
        "tags": [
          "annotation"
        ]
      },
      "put": {
        "description": "Update an annotation if it exists, create a new one otherwise.",
        "operationId": "PutAnnotation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Annotation"
              }
            }
          },
          "description": "The configuration for an annotation to store.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Annotation"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create/Update annotation",
        "tags": [
          "annotation"
        ]
      }
    },
    "/annotations/{annotationId}": {
      "delete": {
        "description": "Delete an annotation.",
        "operationId": "DeleteAnnotation",
        "parameters": [
          {
            "description": "The ID of the annotation to be deleted.",
            "in": "path",
            "name": "annotationId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Delete annotation",
        "tags": [
          "annotation"
        ]
      },
      "get": {
        "description": "Get an annotation identified by its id.",
        "operationId": "GetAnnotation",
        "parameters": [
          {
            "description": "The ID of the annotation to get.",
            "in": "path",
            "name": "annotationId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Annotation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Get annotation",
        "tags": [
          "annotation"
        ]
      }
    },
    "/api-keys": {
      "get": {
        "description": "List API keys belonging to the caller's organisation. Secrets are never returned.",
        "operationId": "ListApiKeys",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyLink"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List API keys",
        "tags": [
          "apiKey"
        ]
      },
      "post": {
        "description": "Create a new API key and return it. The `token` field is shown only once and cannot be retrieved again — the caller must store it securely.\n",
        "operationId": "CreateApiKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "expiresAt": {
                    "description": "Optional expiry timestamp. Omit for a key that does not expire.",
                    "format": "date-time",
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "organisationId": {
                    "description": "Target organisation for the key. Only honoured for callers with the `:all` scope; org-scoped callers always create within their own organisation. Required when an `:all` caller has no active organisation (e.g. support users).\n",
                    "format": "uuid",
                    "type": "string"
                  },
                  "role": {
                    "description": "The role whose permissions the key is granted. The caller may only assign a role they are permitted to grant; assigning `admin` requires admin-level privileges.\n",
                    "enum": [
                      "admin",
                      "manager",
                      "member",
                      "analyst"
                    ],
                    "type": "string"
                  },
                  "siteIds": {
                    "description": "Sites the key is scoped to. Required (and must be non-empty) for the site-scoped roles `member` and `analyst`; must be omitted for the org-scoped roles `admin` and `manager`. Every site must belong to the key's organisation.\n",
                    "items": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "name",
                  "role"
                ],
                "type": "object"
              }
            }
          },
          "description": "The API key to create.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreated"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create API key",
        "tags": [
          "apiKey"
        ]
      }
    },
    "/api-keys/{apiKeyId}": {
      "delete": {
        "description": "Revoke an API key. The key is immediately rejected on subsequent requests.",
        "operationId": "RevokeApiKey",
        "parameters": [
          {
            "description": "The ID of the API key to revoke.",
            "in": "path",
            "name": "apiKeyId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Revoke API key",
        "tags": [
          "apiKey"
        ]
      },
      "get": {
        "description": "Get API key metadata. Secrets are never returned.",
        "operationId": "GetApiKey",
        "parameters": [
          {
            "description": "The ID of the API key.",
            "in": "path",
            "name": "apiKeyId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyLink"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get API key",
        "tags": [
          "apiKey"
        ]
      }
    },
    "/cameras": {
      "get": {
        "description": "List all claimed cameras in the fleet along with the organisations that own them.",
        "operationId": "ListCameras",
        "parameters": [
          {
            "description": "Choose whether camera metrics should be included in the response or not.",
            "in": "query",
            "name": "includeMetrics",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "description": "The ID of the site whose list of associated cameras will be returned.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of a user on whose visibility of the cameras to filter on.",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The camera states to filter on.",
            "in": "query",
            "name": "state",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "running",
                  "paused",
                  "decommissioned"
                ],
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Camera"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List cameras",
        "tags": [
          "camera"
        ]
      },
      "post": {
        "description": "Link a camera to an organisation.",
        "operationId": "CreateCamera",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "serialNumber": {
                    "type": "string"
                  },
                  "siteId": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "serialNumber",
                  "siteId"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Camera"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "This camera has already been claimed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Link camera to organisation",
        "tags": [
          "camera"
        ]
      }
    },
    "/cameras/{cameraId}": {
      "delete": {
        "description": "Decommission a camera that is in state running or paused.",
        "operationId": "DeleteCamera",
        "parameters": [
          {
            "description": "the camera ID of the camera.",
            "in": "path",
            "name": "cameraId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete camera",
        "tags": [
          "camera"
        ]
      },
      "get": {
        "description": "Get a camera identified by the provided camera ID.",
        "operationId": "GetCamera",
        "parameters": [
          {
            "description": "The full camera ID of a camera to be fetched.",
            "in": "path",
            "name": "cameraId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Choose whether camera metrics should be included in the response or not.",
            "in": "query",
            "name": "includeMetrics",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Camera"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get camera",
        "tags": [
          "camera"
        ]
      },
      "patch": {
        "description": "Update camera name and/or direction aliases of the camera identified by the provided camera ID.",
        "operationId": "PatchCamera",
        "parameters": [
          {
            "description": "The full camera ID of a camera to be patched.",
            "in": "path",
            "name": "cameraId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchCameraRequest"
              }
            }
          },
          "description": "Update a camera's name and/or direction alias/es."
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Camera"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Patch camera",
        "tags": [
          "camera"
        ]
      }
    },
    "/cameras/{cameraId}/move": {
      "post": {
        "description": "Move camera to new site",
        "operationId": "MoveCamera",
        "parameters": [
          {
            "in": "path",
            "name": "cameraId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "siteId": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "siteId"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Camera"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Move camera",
        "tags": [
          "camera"
        ]
      }
    },
    "/cameras/{cameraId}/opening-hours": {
      "get": {
        "description": "Get all attributes of a camera model given a camera ID.",
        "operationId": "GetCameraOpeningHour",
        "parameters": [
          {
            "description": "the camera ID of the camera",
            "in": "path",
            "name": "cameraId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Day of the year of requested Opening Hour",
            "in": "query",
            "name": "date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get camera opening hour",
        "tags": [
          "camera"
        ]
      }
    },
    "/cameras/{cameraId}/state/{newState}": {
      "put": {
        "description": "Change the state of a camera from running to paused or vice-versa.",
        "operationId": "PutCameraState",
        "parameters": [
          {
            "description": "the camera ID of the camera.",
            "in": "path",
            "name": "cameraId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The state to which the camera will be set: running cameras are processing video and have notifications on,\npaused cameras are not processing video, notifications are off and can be re-activated.\n",
            "in": "path",
            "name": "newState",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "running",
                "paused"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "OK."
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Change camera state",
        "tags": [
          "camera"
        ]
      }
    },
    "/cameras/{cameraId}/video-upload-metrics": {
      "get": {
        "description": "Get video upload metrics for the provided camera ID",
        "operationId": "GetVideoUploadMetrics",
        "parameters": [
          {
            "description": "the camera ID of the camera",
            "in": "path",
            "name": "cameraId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoUploadMetrics"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get video upload metrics",
        "tags": [
          "camera"
        ]
      }
    },
    "/dwell-time-reports": {
      "get": {
        "description": "List of all dwell time reports for the given organisation",
        "operationId": "ListDwellTimeReports",
        "parameters": [
          {
            "description": "The ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "report status.",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "awaiting_approval",
                "approved",
                "rejected"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DwellTimeRequestResponse"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List Dwell Time Reports",
        "tags": [
          "dwellTimeReport"
        ]
      },
      "post": {
        "description": "Create a report of dwell time for a given time range and given organisation",
        "operationId": "CreateDwellTimeReport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DwellTimeReportRequest"
              }
            }
          },
          "description": "request dwell time data for an organisation and a given time range.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DwellTimeRequestResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create dwell time report",
        "tags": [
          "dwellTimeReport"
        ]
      }
    },
    "/dwell-time-reports/{dwellTimeReportId}": {
      "get": {
        "description": "Get a dwell time report identified by the provided report ID.",
        "operationId": "GetDwellTimeReport",
        "parameters": [
          {
            "description": "The full report ID of a report to be fetched.",
            "in": "path",
            "name": "dwellTimeReportId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DwellTimeRequestResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Get Dwell Time Report",
        "tags": [
          "dwellTimeReport"
        ]
      }
    },
    "/frame-requests": {
      "post": {
        "description": "Get a recent video frame from a camera.",
        "operationId": "CreateFrameRequest",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FrameRequest"
              }
            }
          },
          "description": "The FrameRequest that contains the camera to fetch a frame for.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Frame"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No image available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Request live frame",
        "tags": [
          "camera"
        ]
      }
    },
    "/live-occupancy": {
      "post": {
        "description": "Create a report of live occupancies for a list of occupancy monitors.",
        "operationId": "CreateLiveOccupancyReport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiveOccupancyReport"
              }
            }
          },
          "description": "request live occupancies for a list of occupancy monitors."
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LiveOccupancy"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create live occupancy report",
        "tags": [
          "report"
        ]
      }
    },
    "/notification-group-notification-groups": {
      "get": {
        "description": "Get all notification groups link subject to filters.",
        "operationId": "ListNotificationGroupNotificationGroups",
        "parameters": [
          {
            "description": "The ID of the notification group link to get.",
            "in": "query",
            "name": "notificationGroupNotificationGroupId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the parent notification group to get all nested child IDs.",
            "in": "query",
            "name": "parentNotificationGroupId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the child notification group to get all ancestral IDs.",
            "in": "query",
            "name": "childNotificationGroupId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the organisation the notification group links are linked to.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The state of the notification group notification group link.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/NotificationGroupNotificationGroup"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "List notification group notification groups",
        "tags": [
          "notificationGroupMapping"
        ]
      },
      "put": {
        "description": "Update existing notification group link, create a new one otherwise.",
        "operationId": "PutNotificationGroupNotificationGroup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationGroupNotificationGroup"
              }
            }
          },
          "description": "A link between two notification groups.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationGroupNotificationGroup"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Create/Update notification group notification group",
        "tags": [
          "notificationGroupMapping"
        ]
      }
    },
    "/notification-group-notification-groups/{notificationGroupNotificationGroupId}": {
      "delete": {
        "description": "Set the state of a notification group link to deleted.",
        "operationId": "DeleteNotificationGroupNotificationGroup",
        "parameters": [
          {
            "description": "the ID of the notification group link to delete.",
            "in": "path",
            "name": "notificationGroupNotificationGroupId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Delete notification group notification group",
        "tags": [
          "notificationGroupMapping"
        ]
      },
      "get": {
        "description": "Get a notification group link identified by the provided ID.",
        "operationId": "GetNotificationGroupNotificationGroup",
        "parameters": [
          {
            "description": "The ID of the notification group link to get.",
            "in": "path",
            "name": "notificationGroupNotificationGroupId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationGroupNotificationGroup"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          },
          "501": {
            "description": "Not implemented."
          }
        },
        "summary": "Get notification group notification group",
        "tags": [
          "notificationGroupMapping"
        ]
      }
    },
    "/notification-groups": {
      "get": {
        "description": "Get all notification groups subject to filters.",
        "operationId": "ListNotificationGroups",
        "parameters": [
          {
            "description": "The ID of the notification group to get.",
            "in": "query",
            "name": "notificationGroupId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the alert rule a notification group is linked to.",
            "in": "query",
            "name": "alertId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of the organisation the notification groups are linked to.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The state of the notification group.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          },
          {
            "description": "The ID of a user on whose visibility of the notification groups to filter on.",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/NotificationGroup"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List notification groups",
        "tags": [
          "notificationGroup"
        ]
      },
      "put": {
        "description": "Update a notification group exists if exists, create a new one otherwise.",
        "operationId": "PutNotificationGroup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationGroup"
              }
            }
          },
          "description": "A notification group to send alerts to.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationGroup"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update notification group",
        "tags": [
          "notificationGroup"
        ]
      }
    },
    "/notification-groups/{notificationGroupId}": {
      "delete": {
        "description": "Set the state of a notification group to deleted.",
        "operationId": "DeleteNotificationGroup",
        "parameters": [
          {
            "description": "the ID of the notification group to delete.",
            "in": "path",
            "name": "notificationGroupId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete notification group",
        "tags": [
          "notificationGroup"
        ]
      },
      "get": {
        "description": "Get a notification group identified by the provided ID.",
        "operationId": "GetNotificationGroup",
        "parameters": [
          {
            "description": "The ID of the notification group to get.",
            "in": "path",
            "name": "notificationGroupId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationGroup"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get notification group",
        "tags": [
          "notificationGroup"
        ]
      }
    },
    "/occupancy-monitor-camera-positions": {
      "get": {
        "description": "Get all available occupancy monitor camera positions subject to filters.",
        "operationId": "ListOccupancyMonitorCameraPositions",
        "parameters": [
          {
            "description": "the ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the site the occupancy monitor camera positions are linked to.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of a camera linked to the occupancy monitor camera positions.",
            "in": "query",
            "name": "cameraId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the occupancy monitor the occupancy monitor camera position is linking.",
            "in": "query",
            "name": "occupancyMonitorId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Occupancy monitor camera position state.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OccupancyMonitorCameraPosition"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List occupancy monitor camera positions",
        "tags": [
          "occupancyMonitorCameraPosition"
        ]
      },
      "put": {
        "description": "Update an occupancy monitor's camera position if it exists, create a new\nobject linking the given occupancy monitor to the given camera position otherwise.",
        "operationId": "PutOccupancyMonitorCameraPosition",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OccupancyMonitorCameraPosition"
              }
            }
          },
          "description": "An occupancy monitor camera position.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OccupancyMonitorCameraPosition"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update occupancy monitor camera position",
        "tags": [
          "occupancyMonitorCameraPosition"
        ]
      }
    },
    "/occupancy-monitor-camera-positions/{occupancyMonitorCameraPositionId}": {
      "delete": {
        "description": "Set the state of an occupancy monitor camera position to deleted.",
        "operationId": "DeleteOccupancyMonitorCameraPosition",
        "parameters": [
          {
            "description": "the ID of the occupancy monitor camera position to delete.",
            "in": "path",
            "name": "occupancyMonitorCameraPositionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete occupancy monitor camera position",
        "tags": [
          "occupancyMonitorCameraPosition"
        ]
      },
      "get": {
        "description": "Get an occupancy monitor camera position identified by the provided ID.",
        "operationId": "GetOccupancyMonitorCameraPosition",
        "parameters": [
          {
            "description": "The ID of the occupancy monitor camera position.",
            "in": "path",
            "name": "occupancyMonitorCameraPositionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OccupancyMonitorCameraPosition"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get occupancy monitor camera position",
        "tags": [
          "occupancyMonitorCameraPosition"
        ]
      }
    },
    "/occupancy-monitors": {
      "get": {
        "description": "Get all available occupancy monitors subject to filters.",
        "operationId": "ListOccupancyMonitors",
        "parameters": [
          {
            "description": "the ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the site the occupancy monitors are linked to.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of a camera position linked to the occupancy monitors.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Occupancy monitor state.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OccupancyMonitor"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List occupancy monitors",
        "tags": [
          "occupancyMonitor"
        ]
      },
      "put": {
        "description": "Update an occupancy monitor if it exists, create a new one otherwise.",
        "operationId": "PutOccupancyMonitor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OccupancyMonitor"
              }
            }
          },
          "description": "An occupancy monitor.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OccupancyMonitor"
                }
              }
            }
          },
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update occupancy monitor",
        "tags": [
          "occupancyMonitor"
        ]
      }
    },
    "/occupancy-monitors/{occupancyMonitorId}": {
      "delete": {
        "description": "Set the state of an occupancy monitor to deleted.",
        "operationId": "DeleteOccupancyMonitor",
        "parameters": [
          {
            "description": "the ID of the occupancy monitor.",
            "in": "path",
            "name": "occupancyMonitorId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete occupancy monitor",
        "tags": [
          "occupancyMonitor"
        ]
      },
      "get": {
        "description": "Get an occupancy monitor identified by the provided ID.",
        "operationId": "GetOccupancyMonitor",
        "parameters": [
          {
            "description": "The ID of the Occupancy Monitor.",
            "in": "path",
            "name": "occupancyMonitorId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OccupancyMonitor"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get occupancy monitor",
        "tags": [
          "occupancyMonitor"
        ]
      }
    },
    "/occupancy-reports": {
      "post": {
        "description": "Create a report of occupancy counts for a given time range and set of monitors.",
        "operationId": "CreateOccupancyReport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OccupancyReport"
              }
            }
          },
          "description": "request occupancy data for a set of monitors and a given time range.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Occupancy"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create occupancy report",
        "tags": [
          "report"
        ]
      }
    },
    "/organisations": {
      "get": {
        "description": "List organisations in the portfolio.",
        "operationId": "ListOrganisations",
        "parameters": [
          {
            "description": "The ID of a user.",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Organisation"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List organisations",
        "tags": [
          "organisation"
        ]
      }
    },
    "/organisations/{organisationId}": {
      "get": {
        "description": "Get all attributes of an organisation model given an organisation ID.",
        "operationId": "GetOrganisation",
        "parameters": [
          {
            "description": "The ID of the organisation to be returned.",
            "in": "path",
            "name": "organisationId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organisation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get organisation",
        "tags": [
          "organisation"
        ]
      }
    },
    "/peel-off-monitor-camera-positions": {
      "get": {
        "description": "Get all available peel off monitor camera positions subject to filters.",
        "operationId": "ListPeelOffMonitorCameraPositions",
        "parameters": [
          {
            "description": "the ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the site the peel off monitor camera positions are linked to.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of a camera position linked to the peel off monitor camera positions.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the peel off monitor the peel off monitor camera position is linking.",
            "in": "query",
            "name": "peelOffMonitorId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Peel off monitor camera positions state filter.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PeelOffMonitorCameraPosition"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List peel off monitor camera positions",
        "tags": [
          "peelOffMonitorCameraPosition"
        ]
      },
      "put": {
        "description": "Update a peel off monitor's camera position if it exists, create a new\nobject linking the given peel off monitor to the given camera position otherwise.",
        "operationId": "PutPeelOffMonitorCameraPosition",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeelOffMonitorCameraPosition"
              }
            }
          },
          "description": "A peel off monitor camera position to put.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeelOffMonitorCameraPosition"
                }
              }
            }
          },
          "204": {
            "description": "Updated."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update peel off monitor camera position",
        "tags": [
          "peelOffMonitorCameraPosition"
        ]
      }
    },
    "/peel-off-monitor-camera-positions/{peelOffMonitorCameraPositionId}": {
      "delete": {
        "description": "Set the state of a peel off monitor camera position to deleted.",
        "operationId": "DeletePeelOffMonitorCameraPosition",
        "parameters": [
          {
            "description": "the ID of the peel off monitor camera position to delete.",
            "in": "path",
            "name": "peelOffMonitorCameraPositionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete peel off monitor camera position",
        "tags": [
          "peelOffMonitorCameraPosition"
        ]
      },
      "get": {
        "description": "Get a peel off monitor camera position identified by the provided ID.",
        "operationId": "GetPeelOffMonitorCameraPosition",
        "parameters": [
          {
            "description": "The ID of the peel off monitor camera position to get.",
            "in": "path",
            "name": "peelOffMonitorCameraPositionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeelOffMonitorCameraPosition"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get peel off monitor camera position",
        "tags": [
          "peelOffMonitorCameraPosition"
        ]
      }
    },
    "/peel-off-monitors": {
      "get": {
        "description": "Get all available peel off monitors subject to filters.",
        "operationId": "ListPeelOffMonitors",
        "parameters": [
          {
            "description": "the ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the site the peel off monitors are linked to.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of a camera position linked to the peel off monitors.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Peel off monitors state.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PeelOffMonitor"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List peel off monitors",
        "tags": [
          "peelOffMonitor"
        ]
      },
      "put": {
        "description": "Update a peel off monitor if it exists, create a new one otherwise.",
        "operationId": "PutPeelOffMonitor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeelOffMonitor"
              }
            }
          },
          "description": "A peel off monitor to put.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeelOffMonitor"
                }
              }
            }
          },
          "204": {
            "description": "Updated."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update peel off monitor",
        "tags": [
          "peelOffMonitor"
        ]
      }
    },
    "/peel-off-monitors/{peelOffMonitorId}": {
      "delete": {
        "description": "Set the state of a peel off monitor to deleted.",
        "operationId": "DeletePeelOffMonitor",
        "parameters": [
          {
            "description": "the ID of the peel off monitor to delete.",
            "in": "path",
            "name": "peelOffMonitorId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete peel off monitor",
        "tags": [
          "peelOffMonitor"
        ]
      },
      "get": {
        "description": "Get a peel off monitor identified by the provided ID.",
        "operationId": "GetPeelOffMonitor",
        "parameters": [
          {
            "description": "The ID of the peel off monitor.",
            "in": "path",
            "name": "peelOffMonitorId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeelOffMonitor"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get peel off monitor",
        "tags": [
          "peelOffMonitor"
        ]
      }
    },
    "/peel-off-reports": {
      "post": {
        "description": "Create a peel off report for a given time range and set of monitors.",
        "operationId": "CreatePeelOffReport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeelOffReport"
              }
            }
          },
          "description": "request peel off data for a set of monitors and a given time range.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PeelOffData"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create peel off report",
        "tags": [
          "report"
        ]
      }
    },
    "/people-count-monitor-camera-positions": {
      "get": {
        "description": "Get all available occupancy monitor camera positions subject to filters.",
        "operationId": "ListPeopleCountMonitorCameraPositions",
        "parameters": [
          {
            "description": "the ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the site the people count monitor camera positions are linked to.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of a camera position linked to the people count monitor camera positions.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the people count monitor the people count monitor camera position is linking.",
            "in": "query",
            "name": "peopleCountMonitorId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "People count monitor camera positions state filter.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PeopleCountMonitorCameraPosition"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List people count monitor camera positions",
        "tags": [
          "peopleCountMonitorCameraPosition"
        ]
      },
      "put": {
        "description": "Update a people count monitor's camera position if it exists, create a new\nobject linking the given people count monitor to the given camera position otherwise.",
        "operationId": "PutPeopleCountMonitorCameraPosition",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleCountMonitorCameraPosition"
              }
            }
          },
          "description": "A people count monitor camera position to put.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleCountMonitorCameraPosition"
                }
              }
            }
          },
          "204": {
            "description": "Updated."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update people count monitor camera position",
        "tags": [
          "peopleCountMonitorCameraPosition"
        ]
      }
    },
    "/people-count-monitor-camera-positions/{peopleCountMonitorCameraPositionId}": {
      "delete": {
        "description": "Set the state of a people count monitor camera position to deleted.",
        "operationId": "DeletePeopleCountMonitorCameraPosition",
        "parameters": [
          {
            "description": "the ID of the people count monitor camera position to delete.",
            "in": "path",
            "name": "peopleCountMonitorCameraPositionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete people count monitor camera position",
        "tags": [
          "peopleCountMonitorCameraPosition"
        ]
      },
      "get": {
        "description": "Get a people count monitor camera position identified by the provided ID.",
        "operationId": "GetPeopleCountMonitorCameraPosition",
        "parameters": [
          {
            "description": "The ID of the people count monitor camera position to get.",
            "in": "path",
            "name": "peopleCountMonitorCameraPositionId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleCountMonitorCameraPosition"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get people count monitor camera position",
        "tags": [
          "peopleCountMonitorCameraPosition"
        ]
      }
    },
    "/people-count-monitors": {
      "get": {
        "description": "Get all available occupancy monitors subject to filters.",
        "operationId": "ListPeopleCountMonitors",
        "parameters": [
          {
            "description": "the ID of the associated organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of the site the people count monitors are linked to.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "the ID of a camera position linked to the people count monitors.",
            "in": "query",
            "name": "cameraPositionId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "People count monitors state.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PeopleCountMonitor"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List people count monitors",
        "tags": [
          "peopleCountMonitor"
        ]
      },
      "put": {
        "description": "Update a people count monitor if it exists, create a new one otherwise.",
        "operationId": "PutPeopleCountMonitor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleCountMonitor"
              }
            }
          },
          "description": "A people count monitor to put.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleCountMonitor"
                }
              }
            }
          },
          "204": {
            "description": "Updated."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update people count monitor",
        "tags": [
          "peopleCountMonitor"
        ]
      }
    },
    "/people-count-monitors/{peopleCountMonitorId}": {
      "delete": {
        "description": "Set the state of a people count monitor to deleted.",
        "operationId": "DeletePeopleCountMonitor",
        "parameters": [
          {
            "description": "the ID of the people count monitor to delete.",
            "in": "path",
            "name": "peopleCountMonitorId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete people count monitor",
        "tags": [
          "peopleCountMonitor"
        ]
      },
      "get": {
        "description": "Get a people count monitor identified by the provided ID.",
        "operationId": "GetPeopleCountMonitor",
        "parameters": [
          {
            "description": "The ID of the people count monitor.",
            "in": "path",
            "name": "peopleCountMonitorId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleCountMonitor"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get people count monitor",
        "tags": [
          "peopleCountMonitor"
        ]
      }
    },
    "/people-count-reports": {
      "post": {
        "description": "Create a report of people counts for a given time range and set of monitors.",
        "operationId": "CreatePeopleCountReport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleCountReport"
              }
            }
          },
          "description": "request people count data for a set of monitors and a given time range.",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PeopleCount"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create people count report",
        "tags": [
          "report"
        ]
      }
    },
    "/put-camera-state-requests": {
      "post": {
        "description": "Change the state of a camera from claimed to claimed_paused or vice-versa.",
        "operationId": "PutCameraStateRequest",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "cameraId": {
                    "description": "the camera ID of the camera.",
                    "format": "uuid",
                    "type": "string"
                  },
                  "newState": {
                    "description": "The state to which the camera will be set: claimed cameras are processing video and have notifications on,\nclaimed_paused cameras are not processing video, notifications are off and can be re-activated.\n",
                    "enum": [
                      "claimed",
                      "claimed_paused"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "cameraId",
                  "newState"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Change camera state",
        "tags": [
          "camera"
        ]
      }
    },
    "/register-camera-requests": {
      "post": {
        "description": "Create a camera in a registered state.",
        "operationId": "RegisterCameraRequest",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "cameraId": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "serialNumber": {
                    "type": "string"
                  }
                },
                "required": [
                  "cameraId",
                  "serialNumber"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Register camera",
        "tags": [
          "camera"
        ]
      }
    },
    "/sites": {
      "get": {
        "description": "List all the sites in the portfolio along with the organisations that own them.",
        "operationId": "ListSites",
        "parameters": [
          {
            "description": "The ID of an organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of a user.",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Site state.",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Site"
                  },
                  "type": "array"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List sites",
        "tags": [
          "site"
        ]
      },
      "put": {
        "description": "Update site information.",
        "operationId": "PutSite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Site"
              }
            }
          },
          "description": "Update site information.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          },
          "204": {
            "description": "Update was successful."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update site",
        "tags": [
          "site"
        ]
      }
    },
    "/sites/{siteId}": {
      "delete": {
        "description": "Set the state of a site to decommissioned.",
        "operationId": "DeleteSite",
        "parameters": [
          {
            "description": "The ID of the site that will be decommissioned.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Gone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete site",
        "tags": [
          "site"
        ]
      },
      "get": {
        "description": "Get all attributes of a site model given a site ID.",
        "operationId": "GetSite",
        "parameters": [
          {
            "description": "The ID of the site to be returned.",
            "in": "path",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get site",
        "tags": [
          "site"
        ]
      }
    },
    "/users": {
      "get": {
        "description": "Fetch the list of users associated with an organisation or site.",
        "operationId": "ListUsers",
        "parameters": [
          {
            "description": "The ID of an organisation.",
            "in": "query",
            "name": "organisationId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "The ID of a site.",
            "in": "query",
            "name": "siteId",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "When true, include support users in the response.",
            "in": "query",
            "name": "includeSupport",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/User"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "List users",
        "tags": [
          "user"
        ]
      },
      "put": {
        "description": "Create/Update an user.",
        "operationId": "PutUser",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/User"
              }
            }
          },
          "description": "A user to update.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "204": {
            "description": "OK."
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Create/Update user",
        "tags": [
          "user"
        ]
      }
    },
    "/users/me": {
      "get": {
        "description": "Returns the profile data of the caller.",
        "operationId": "GetMe",
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get my profile",
        "tags": [
          "user"
        ]
      }
    },
    "/users/{userId}": {
      "delete": {
        "description": "Remove an user.",
        "operationId": "DeleteUser",
        "parameters": [
          {
            "description": "The ID of the user to be deleted.",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK."
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Delete user",
        "tags": [
          "user"
        ]
      },
      "get": {
        "description": "Get details of the user given by the ID.",
        "operationId": "GetUser",
        "parameters": [
          {
            "description": "The ID of the user to be returned.",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Failed."
          }
        },
        "summary": "Get user",
        "tags": [
          "user"
        ]
      }
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "tags": [
    {
      "description": "APIs to manage an Organisation's monitor reports.",
      "name": "report",
      "x-displayName": "Reports"
    },
    {
      "description": "APIs to manage an Organisation's Dwell Time reports.",
      "name": "dwellTimeReport",
      "x-displayName": "Dwell Times"
    },
    {
      "description": "APIs to manage Organisations.",
      "name": "organisation",
      "x-displayName": "Organisations"
    },
    {
      "description": "APIs to manage an organisation's sites.",
      "name": "site",
      "x-displayName": "Sites"
    },
    {
      "description": "APIs to manage an organisation's cameras.",
      "name": "camera",
      "x-displayName": "Cameras"
    },
    {
      "description": "APIs to manage an organisation's notification groups.",
      "name": "notificationGroup",
      "x-displayName": "Notification Groups"
    },
    {
      "description": "APIs to manage an organisation's notification group links.",
      "name": "notificationGroupMapping",
      "x-displayName": "Notification Group Mappings"
    },
    {
      "description": "APIs to manage an Organisation's occupancy monitors.",
      "name": "occupancyMonitor",
      "x-displayName": "Occupancy Monitors"
    },
    {
      "description": "APIs to manage an Organisation's occupancy monitor camera positions.",
      "name": "occupancyMonitorCameraPosition",
      "x-displayName": "Occupancy Monitor Camera Positions"
    },
    {
      "description": "APIs to manage an Organisation's people count monitors.",
      "name": "peopleCountMonitor",
      "x-displayName": "People Count Monitors"
    },
    {
      "description": "APIs to manage an Organisation's people count monitor camera positions.",
      "name": "peopleCountMonitorCameraPosition",
      "x-displayName": "People Count Monitor Camera Positions"
    },
    {
      "description": "APIs to manage an Organisation's users.",
      "name": "user",
      "x-displayName": "Users"
    },
    {
      "description": "APIs to manage an organisation's alert notification group links.",
      "name": "alertNotificationGroup",
      "x-displayName": "Alert Notification Groups"
    },
    {
      "description": "APIs to manage an organisation's alerts.",
      "name": "alert",
      "x-displayName": "Alert"
    },
    {
      "description": "APIs to manage an organisation's alert camera position links.",
      "name": "alertCameraPosition",
      "x-displayName": "Alert Camera Positions"
    },
    {
      "description": "APIs to manage an organisation's alert site links.",
      "name": "alertSite",
      "x-displayName": "Alert Sites"
    },
    {
      "description": "APIs to manage an organisation's alert occupancy monitor links.",
      "name": "alertOccupancyMonitor",
      "x-displayName": "Alert Occupancy Monitors"
    },
    {
      "description": "APIs to manage an organisation's alert people count monitor links.",
      "name": "alertPeopleCountMonitor",
      "x-displayName": "Alert People Count Monitors"
    },
    {
      "description": "APIs to manage an annotation.",
      "name": "annotation",
      "x-displayName": "Annotations"
    },
    {
      "description": "APIs to manage API keys.",
      "name": "apiKey",
      "x-displayName": "API Keys"
    },
    {
      "description": "APIs to manage an Organisation's peel off monitors.",
      "name": "peelOffMonitor",
      "x-displayName": "Peel Off Monitors"
    },
    {
      "description": "APIs to manage an Organisation's peel off monitor camera positions.",
      "name": "peelOffMonitorCameraPosition",
      "x-displayName": "Peel Off Monitor Camera Positions"
    },
    {
      "description": "APIs to manage talkbacks devices and reports.",
      "name": "talkBack",
      "x-displayName": "TalkBack"
    }
  ],
  "x-tagGroups": [
    {
      "name": "ANALYTICS",
      "tags": [
        "report",
        "dwellTimeReport"
      ]
    },
    {
      "name": "ADMIN",
      "tags": [
        "organisation",
        "user",
        "apiKey"
      ]
    },
    {
      "name": "SITE",
      "tags": [
        "site"
      ]
    },
    {
      "name": "CAMERA",
      "tags": [
        "camera",
        "annotation"
      ]
    },
    {
      "name": "ALERT",
      "tags": [
        "alert",
        "alertNotificationGroup",
        "alertCameraPosition",
        "alertOccupancyMonitor",
        "alertSite"
      ]
    },
    {
      "name": "NOTIFICATION GROUP",
      "tags": [
        "notificationGroup",
        "notificationGroupMapping"
      ]
    },
    {
      "name": "OCCUPANCY MONITOR",
      "tags": [
        "occupancyMonitor",
        "occupancyMonitorCameraPosition"
      ]
    },
    {
      "name": "PEOPLE-COUNT MONITOR",
      "tags": [
        "peopleCountMonitor",
        "peopleCountMonitorCameraPosition"
      ]
    },
    {
      "name": "PEEL-OFF MONITOR",
      "tags": [
        "peelOffMonitor",
        "peelOffMonitorCameraPosition"
      ]
    },
    {
      "name": "TalkBack",
      "tags": [
        "talkBack"
      ]
    }
  ],
  "servers": [
    {
      "url": "https://nexus.hoxton.ai/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "description": "Hoxton-issued API key, passed as a bearer token in the `Authorization` header. Format: `Authorization: Bearer hxt_live_<prefix>.<secret>`.",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    },
    "schemas": {
      "AggregatedApiRequestMetrics": {
        "properties": {
          "clientID": {
            "readOnly": true,
            "type": "string"
          },
          "dailyAPICallCount": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "dailyActiveUser": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "organisationID": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "AggregatedApiRequestMetricsReport": {
        "properties": {
          "clientIds": {
            "description": "A list of IDs of the clients to fetch the data for.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "endDate": {
            "description": "It is the upper bound of the date range for which to return data. The `endDate` is non-inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          },
          "startDate": {
            "description": "It is the lower bound of the date range for which to return data. The `startDate` is inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AggregatedVideoMetrics": {
        "properties": {
          "cameraId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "lateCount": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "missingCount": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "onTimeCount": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "time": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "AggregatedVideoMetricsReport": {
        "properties": {
          "cameraIds": {
            "description": "A list of IDs of the cameras to fetch the data for.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "endDate": {
            "description": "It is the upper bound of the date range for which to return data. The `endDate` is non-inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "startDate": {
            "description": "It is the lower bound of the date range for which to return data. The `startDate` is inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          },
          "timeGrain": {
            "default": "24h",
            "description": "The time granularity of the response.",
            "enum": [
              "1h",
              "24h",
              "168h"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Alert": {
        "properties": {
          "alertScope": {
            "description": "The scope level of the alert.",
            "enum": [
              "mixed",
              "organisation",
              "resource",
              "site"
            ],
            "readOnly": true,
            "type": "string"
          },
          "alertType": {
            "enum": [
              "offline_alert",
              "occupancy_alert",
              "camera_health_summary_alert",
              "people_count"
            ],
            "type": "string"
          },
          "configurationDetails": {
            "description": "Type-specific alert configuration; its shape depends on alertType. For occupancy_alert see OccupancyAlertConfiguration. Validated server-side rather than by this (Swagger 2.0) schema.",
            "type": "object"
          },
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "emails": {
            "items": {
              "format": "email",
              "type": "string"
            },
            "minItems": 1,
            "type": "array",
            "x-omitempty": true,
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "organisationId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          },
          "webhook": {
            "type": "object"
          }
        },
        "required": [
          "organisationId",
          "alertType",
          "name"
        ],
        "type": "object"
      },
      "AlertCameraPosition": {
        "properties": {
          "alertId": {
            "format": "uuid",
            "type": "string"
          },
          "cameraPositionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "alertId",
          "cameraPositionId"
        ],
        "type": "object"
      },
      "AlertNotificationGroup": {
        "properties": {
          "alertId": {
            "format": "uuid",
            "type": "string"
          },
          "notificationGroupId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "alertId",
          "notificationGroupId"
        ],
        "type": "object"
      },
      "AlertOccupancyMonitor": {
        "properties": {
          "alertId": {
            "format": "uuid",
            "type": "string"
          },
          "occupancyMonitorId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "alertId",
          "occupancyMonitorId"
        ],
        "type": "object"
      },
      "AlertPeopleCountMonitor": {
        "properties": {
          "alertId": {
            "format": "uuid",
            "type": "string"
          },
          "peopleCountMonitorId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "alertId",
          "peopleCountMonitorId"
        ],
        "type": "object"
      },
      "AlertSite": {
        "properties": {
          "alertId": {
            "format": "uuid",
            "type": "string"
          },
          "siteId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "alertId",
          "siteId"
        ],
        "type": "object"
      },
      "Annotation": {
        "properties": {
          "cameraPositionId": {
            "format": "uuid",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "kind": {
            "enum": [
              "polygon",
              "multipolygon"
            ],
            "type": "string"
          },
          "roi": {
            "type": "object",
            "x-go-type": {
              "hints": {
                "kind": "interface"
              },
              "import": {
                "package": "github.com/paulmach/orb/geojson"
              },
              "type": "FeatureCollection"
            },
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "required": [
          "cameraPositionId",
          "roi"
        ],
        "type": "object"
      },
      "ApiKeyCreated": {
        "description": "The response returned when a new API key is created. The `apiKey` is shown only once.",
        "properties": {
          "apiKey": {
            "description": "The full API key, sent as a bearer token in the Authorization header. Returned once at creation and never again.",
            "readOnly": true,
            "type": "string"
          },
          "apiKeyId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "organisationId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "prefix": {
            "description": "Public identifier embedded in the API key; also shown in the UI.",
            "readOnly": true,
            "type": "string"
          },
          "role": {
            "description": "The role whose permissions the key is granted.",
            "type": "string"
          },
          "siteIds": {
            "description": "Sites the key is scoped to. Populated for member and analyst keys; empty for admin and manager keys.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "apiKeyId",
          "name",
          "prefix",
          "apiKey",
          "organisationId",
          "role"
        ]
      },
      "ApiKeyLink": {
        "description": "API key metadata. Secrets are never included.",
        "properties": {
          "apiKeyId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "createdBy": {
            "readOnly": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastUsedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "organisationId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "prefix": {
            "readOnly": true,
            "type": "string"
          },
          "revokedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "role": {
            "description": "The role whose permissions the key is granted.",
            "readOnly": true,
            "type": "string"
          },
          "siteIds": {
            "description": "Sites the key is scoped to. Populated for member and analyst keys; empty for admin and manager keys.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "apiKeyId",
          "name",
          "prefix",
          "organisationId"
        ]
      },
      "Camera": {
        "properties": {
          "cameraPositionId": {
            "format": "uuid",
            "type": "string"
          },
          "cameraStatus": {
            "enum": [
              "offline",
              "online",
              "not_recording",
              "lagging",
              "not_uploading"
            ],
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "claimedAt": {
            "format": "date-time",
            "type": "string"
          },
          "direction1Alias": {
            "type": "string"
          },
          "direction2Alias": {
            "type": "string"
          },
          "encodedFramesProportion": {
            "description": "The number of frames encoded over the expected number of frames in the last 2 minutes.",
            "format": "float64",
            "minimum": 0,
            "readOnly": true,
            "type": "number",
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isOnline": {
            "type": "boolean",
            "nullable": true
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastVideoAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "networkTransmitRate": {
            "description": "The rate in bytes/second the camera sends information over the network at.",
            "format": "uint64",
            "minimum": 0,
            "readOnly": true,
            "type": "number",
            "nullable": true
          },
          "organisationId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "serialNumber": {
            "readOnly": true,
            "type": "string"
          },
          "siteId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "running",
              "decommissioned",
              "paused"
            ],
            "type": "string"
          },
          "videoBacklog": {
            "description": "The number of milliseconds of video the camera is waiting to upload.",
            "format": "uint64",
            "minimum": 0,
            "type": "number",
            "nullable": true
          },
          "videoUploadLatency": {
            "description": "The number of milliseconds it took the latest video uploaded to be uploaded.",
            "minimum": 0,
            "readOnly": true,
            "type": "number",
            "nullable": true
          }
        },
        "type": "object"
      },
      "CameraPositionPeopleCount": {
        "properties": {
          "cameraName": {
            "readOnly": true,
            "type": "string"
          },
          "cameraPositionId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "direction1Alias": {
            "readOnly": true,
            "type": "string"
          },
          "direction1Count": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "direction2Alias": {
            "readOnly": true,
            "type": "string"
          },
          "direction2Count": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "time": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CameraPositionPeopleCountReport": {
        "properties": {
          "cameraPositionIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "endDate": {
            "description": "The upper bound of the date range (non-inclusive).",
            "format": "date",
            "type": "string"
          },
          "isOpen": {
            "default": false,
            "description": "Flag to filter output within site opening hour window",
            "type": "boolean"
          },
          "startDate": {
            "description": "The lower bound of the date range (inclusive).",
            "format": "date",
            "type": "string"
          },
          "timeGrain": {
            "default": "1h",
            "description": "The time window for data aggregation. Time grains below `1h` are only available for the most recent 6 months of data. When `startDate` is more than 6 months in the past only `1h`, `6h` and `24h` are accepted; such requests are served from hourly rollups which may exclude the most recent day.",
            "enum": [
              "1s",
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "6h",
              "24h"
            ],
            "type": "string"
          }
        },
        "required": [
          "cameraPositionIds",
          "endDate",
          "startDate"
        ],
        "type": "object"
      },
      "DwellTimeData": {
        "properties": {
          "day": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "dwellTime": {
            "type": "string"
          },
          "monitorType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "DwellTimeReportRequest": {
        "properties": {
          "endDate": {
            "description": "It is the upper bound of the date range for which to return data. The `endDate` is non-inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          },
          "occupancyMonitorIds": {
            "description": "List of occupancy monitor ids in the report.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "organisationId": {
            "format": "uuid",
            "type": "string"
          },
          "peopleCountMonitorIds": {
            "description": "List of people count monitor ids in the report.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "startDate": {
            "description": "It is the lower bound of the date range for which to return data. The `startDate` is inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`. Dwell time reports are only available for the most recent 6 months of data; a `startDate` more than 6 months in the past is rejected.",
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "endDate",
          "organisationId",
          "startDate"
        ],
        "type": "object"
      },
      "DwellTimeRequestResponse": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "dwellTimeReportId": {
            "format": "uuid",
            "type": "string"
          },
          "endDate": {
            "description": "It is the upper bound of the date range for which to return data. The `endDate` is non-inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          },
          "errorMessage": {
            "description": "error in dwell time report.",
            "type": "string"
          },
          "occupancyMonitorIds": {
            "description": "List of occupancy monitor ids in the report.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "organisationId": {
            "format": "uuid",
            "type": "string"
          },
          "peopleCountMonitorIds": {
            "description": "List of people count monitor ids in the report.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "reportData": {
            "items": {
              "$ref": "#/components/schemas/DwellTimeData"
            },
            "type": "array"
          },
          "startDate": {
            "description": "It is the lower bound of the date range for which to return data. The `startDate` is inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          },
          "status": {
            "enum": [
              "completed",
              "completed_with_errors",
              "pending"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Error": {
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Frame": {
        "properties": {
          "image": {
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FrameRequest": {
        "properties": {
          "cameraId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "cameraId"
        ],
        "type": "object"
      },
      "Job": {
        "properties": {
          "id": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "msg": {
            "type": "string"
          },
          "status": {
            "enum": [
              "created",
              "failed",
              "success"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "msg"
        ]
      },
      "LiveOccupancy": {
        "properties": {
          "occupancy": {
            "readOnly": true,
            "type": "integer"
          },
          "occupancyMonitorId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "LiveOccupancyReport": {
        "properties": {
          "occupancyMonitorIds": {
            "description": "List of occupancy monitor ids in the report.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "organisationIds": {
            "description": "List of organisation ids in the report.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "siteIds": {
            "description": "List of site ids in the report.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array",
            "nullable": true
          }
        }
      },
      "MetricPoint": {
        "properties": {
          "intervalEnd": {
            "description": "intervalEnd is the end of the time interval in which the measurement was taken.",
            "format": "date-time",
            "type": "string"
          },
          "intervalStart": {
            "description": "intervalStart is the start of the time interval in which the measurement was taken.",
            "format": "date-time",
            "type": "string"
          },
          "value": {
            "description": "the value of the measurement for the given interval.",
            "type": "number"
          }
        },
        "required": [
          "intervalEnd",
          "intervalStart",
          "value"
        ]
      },
      "NotificationGroup": {
        "properties": {
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "emails": {
            "items": {
              "format": "email",
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "organisationId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          },
          "webhook": {
            "type": "object"
          }
        },
        "required": [
          "name",
          "organisationId"
        ],
        "type": "object"
      },
      "NotificationGroupNotificationGroup": {
        "properties": {
          "childId": {
            "format": "uuid",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "organisationId": {
            "format": "uuid",
            "type": "string"
          },
          "parentId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "required": [
          "organisationId",
          "childId",
          "parentId"
        ],
        "type": "object"
      },
      "Occupancy": {
        "properties": {
          "inCountSum": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "occupancyAvg": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "occupancyMax": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "occupancyMonitorId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "outCountSum": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "time": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "OccupancyAlertConfiguration": {
        "description": "Configuration for an occupancy alert (alertType occupancy_alert), supplied as the Alert.configurationDetails object. Thresholds are fractions of the monitor's capacity (e.g. 0.89 means 89%). Bands are ordered warningRecoveryThreshold < warningThreshold < alertRecoveryThreshold <= alertThreshold. When notifyAlertRecovery is false, alertRecoveryThreshold is unused and warningThreshold need only sit below alertThreshold. These rules are enforced server-side; Swagger 2.0 cannot express the conditional requirement declaratively.",
        "properties": {
          "alertRecoveryThreshold": {
            "description": "Fraction of capacity below which the alert clears. Greater than 0 and less than or equal to alertThreshold. Required only when notifyAlertRecovery is true; ignored otherwise.",
            "exclusiveMinimum": true,
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "alertThreshold": {
            "description": "Fraction of capacity at or above which the alert fires.",
            "exclusiveMinimum": true,
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "duration": {
            "description": "Dwell time the breach must persist before alerting, as a Go duration string (e.g. 15m). Defaults to 15m.",
            "type": "string"
          },
          "notifyAlert": {
            "description": "Whether to notify when the alert threshold is breached. Defaults to true.",
            "type": "boolean"
          },
          "notifyAlertRecovery": {
            "description": "Whether to notify when occupancy recovers below alertRecoveryThreshold. Defaults to false.",
            "type": "boolean"
          },
          "notifyWarning": {
            "description": "Whether to notify when the warning threshold is breached. Defaults to false.",
            "type": "boolean"
          },
          "notifyWarningRecovery": {
            "description": "Whether to notify when occupancy recovers below warningRecoveryThreshold. Defaults to false.",
            "type": "boolean"
          },
          "recoveryNotifyDelay": {
            "description": "Delay before a recovery notification is sent, as a Go duration string (e.g. 15m). Defaults to 15m.",
            "type": "string"
          },
          "warningRecoveryThreshold": {
            "description": "Fraction of capacity below which a warning clears. Less than warningThreshold. Required when warningThreshold is set.",
            "exclusiveMinimum": true,
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "warningThreshold": {
            "description": "Fraction of capacity at or above which a warning is raised. Below alertRecoveryThreshold (or alertThreshold when notifyAlertRecovery is false). Enables warning notifications when set.",
            "exclusiveMinimum": true,
            "format": "double",
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "alertThreshold"
        ],
        "type": "object"
      },
      "OccupancyMonitor": {
        "properties": {
          "capacity": {
            "example": 100,
            "format": "uint64",
            "minimum": 1,
            "type": "integer",
            "nullable": true
          },
          "dailyResetTime": {
            "default": "00:00",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "openingHour": {
            "type": "object",
            "x-go-type": {
              "hints": {
                "kind": "interface",
                "noValidation": true
              },
              "type": "hoxton.DayOpeningHour"
            },
            "nullable": true
          },
          "reportingEndDate": {
            "format": "date",
            "type": "string",
            "nullable": true
          },
          "reportingStartDate": {
            "format": "date",
            "type": "string",
            "nullable": true
          },
          "siteId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "required": [
          "dailyResetTime",
          "name",
          "siteId"
        ],
        "type": "object"
      },
      "OccupancyMonitorCameraPosition": {
        "properties": {
          "cameraPositionId": {
            "format": "uuid",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "inDirection": {
            "enum": [
              "direction_1",
              "direction_2"
            ],
            "type": "string"
          },
          "occupancyMonitorId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "required": [
          "cameraPositionId",
          "inDirection",
          "occupancyMonitorId"
        ],
        "type": "object"
      },
      "OccupancyReport": {
        "properties": {
          "endDate": {
            "description": "It is the upper bound of the date range for which to return data. The `endDate` is non-inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`.",
            "format": "date",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "isOpen": {
            "default": false,
            "description": "Flag to filter output within site opening hour window",
            "type": "boolean"
          },
          "limit": {
            "description": "Number of rows of returned data. A `0` value returns all rows in the requested time range.",
            "type": "integer"
          },
          "metrics": {
            "description": "List of metrics associated with the monitors.",
            "items": {
              "enum": [
                "occupancy_avg",
                "occupancy_max",
                "in_count_sum",
                "out_count_sum"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "occupancyMonitorIds": {
            "description": "List of occupancy monitor ids in the report. At least one id is required.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "startDate": {
            "description": "It is the lower bound of the date range for which to return data. The `startDate` is inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`.",
            "format": "date",
            "type": "string"
          },
          "timeGrain": {
            "default": "1m",
            "description": "The time window in the requested range for data aggregation. Time grains below `1h` are only available for the most recent 6 months of data. When `startDate` is more than 6 months in the past only `1h`, `6h` and `24h` are accepted; such requests are served from hourly rollups which may exclude the most recent day.",
            "enum": [
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "6h",
              "24h"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Organisation": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "licence": {
            "items": {
              "enum": [
                "data_explorer",
                "occupancy_monitor",
                "people_count",
                "real_time",
                "dwell_time"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "maxAdminSeats": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer",
            "nullable": true
          },
          "maxUserSeats": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "processingGroup": {
            "format": "int64",
            "minimum": 0,
            "type": "integer",
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "churned",
              "disabled"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PatchCameraRequest": {
        "properties": {
          "direction1Alias": {
            "type": "string"
          },
          "direction2Alias": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PatchDwellTimeReportRequest": {
        "properties": {
          "errorMessage": {
            "type": "string"
          },
          "reportData": {
            "items": {
              "$ref": "#/components/schemas/DwellTimeData"
            },
            "type": "array"
          },
          "status": {
            "enum": [
              "awaiting_approval",
              "pending"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PeelOffData": {
        "properties": {
          "base": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "readOnly": true,
            "type": "string"
          },
          "peelOff": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "rate": {
            "format": "float64",
            "readOnly": true,
            "type": "number",
            "nullable": true
          },
          "time": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "PeelOffMonitor": {
        "properties": {
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "openingHour": {
            "type": "object",
            "x-go-type": {
              "hints": {
                "kind": "interface",
                "noValidation": true
              },
              "type": "hoxton.DayOpeningHour"
            },
            "nullable": true
          },
          "reportingEndDate": {
            "format": "date",
            "type": "string",
            "nullable": true
          },
          "reportingStartDate": {
            "format": "date",
            "type": "string",
            "nullable": true
          },
          "siteId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "required": [
          "siteId"
        ],
        "type": "object"
      },
      "PeelOffMonitorCameraPosition": {
        "properties": {
          "cameraPositionId": {
            "format": "uuid",
            "type": "string"
          },
          "countDirection": {
            "enum": [
              "direction_1",
              "direction_2",
              "direction_both"
            ],
            "type": "string"
          },
          "countType": {
            "enum": [
              "base",
              "peel_off"
            ],
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "peelOffMonitorId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "required": [
          "cameraPositionId",
          "countDirection",
          "countType",
          "peelOffMonitorId"
        ],
        "type": "object"
      },
      "PeelOffReport": {
        "properties": {
          "endDate": {
            "description": "It is the upper bound of the date range for which to return data. The `endDate` is non-inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`. If provided will take precedence over endAt.",
            "format": "date",
            "type": "string"
          },
          "isOpen": {
            "default": false,
            "description": "Flag to filter output within site opening hour window",
            "type": "boolean"
          },
          "peelOffMonitorIds": {
            "description": "List of peel off monitor ids in the report. At least one id is required.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "startDate": {
            "description": "It is the lower bound of the date range for which to return data. The `startDate` is inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`.",
            "format": "date",
            "type": "string"
          },
          "timeGrain": {
            "default": "1h",
            "description": "The time window in the requested range to for data aggregation. Time grains below `1h` are only available for the most recent 6 months of data. When `startDate` is more than 6 months in the past only `1h`, `6h` and `24h` are accepted; such requests are served from hourly rollups which may exclude the most recent day.",
            "enum": [
              "1s",
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "6h",
              "24h"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PeopleCount": {
        "properties": {
          "direction1Alias": {
            "readOnly": true,
            "type": "string"
          },
          "direction1Count": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "direction2Alias": {
            "readOnly": true,
            "type": "string"
          },
          "direction2Count": {
            "readOnly": true,
            "type": "integer",
            "nullable": true
          },
          "monitorName": {
            "readOnly": true,
            "type": "string"
          },
          "peopleCountMonitorId": {
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "PeopleCountMonitor": {
        "properties": {
          "dailyResetTime": {
            "default": "00:00",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
            "type": "string",
            "nullable": true
          },
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "direction1Alias": {
            "type": "string"
          },
          "direction2Alias": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "openingHour": {
            "type": "object",
            "x-go-type": {
              "hints": {
                "kind": "interface",
                "noValidation": true
              },
              "type": "hoxton.DayOpeningHour"
            },
            "nullable": true
          },
          "reportingEndDate": {
            "format": "date",
            "type": "string",
            "nullable": true
          },
          "reportingStartDate": {
            "format": "date",
            "type": "string",
            "nullable": true
          },
          "siteId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "required": [
          "siteId"
        ],
        "type": "object"
      },
      "PeopleCountMonitorCameraPosition": {
        "properties": {
          "cameraPositionId": {
            "format": "uuid",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string",
            "nullable": true
          },
          "direction1": {
            "enum": [
              "direction_1",
              "direction_2"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "peopleCountMonitorId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "required": [
          "cameraPositionId",
          "direction1",
          "peopleCountMonitorId"
        ],
        "type": "object"
      },
      "PeopleCountReport": {
        "properties": {
          "endDate": {
            "description": "It is the upper bound of the date range for which to return data. The `endDate` is non-inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`.",
            "format": "date",
            "type": "string"
          },
          "isOpen": {
            "default": false,
            "description": "Flag to filter output within site opening hour window",
            "type": "boolean"
          },
          "peopleCountMonitorIds": {
            "description": "List of people count monitor ids in the report. At least one id is required.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "startDate": {
            "description": "It is the lower bound of the date range for which to return data. The `startDate` is inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`.",
            "format": "date",
            "type": "string"
          },
          "timeGrain": {
            "default": "1h",
            "description": "The time window in the requested range to for data aggregation. Time grains below `1h` are only available for the most recent 6 months of data. When `startDate` is more than 6 months in the past only `1h`, `6h` and `24h` are accepted; such requests are served from hourly rollups which may exclude the most recent day.",
            "enum": [
              "1s",
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "6h",
              "24h"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PutDwellTimeReportRequest": {
        "properties": {
          "approvedBy": {
            "description": "approver of dwell time report",
            "type": "string"
          },
          "errorMessage": {
            "description": "error message if rejected",
            "type": "string"
          },
          "status": {
            "description": "The status of a dwell time.",
            "enum": [
              "approved",
              "rejected"
            ],
            "type": "string"
          }
        },
        "required": [
          "approvedBy",
          "status"
        ]
      },
      "ReportFilter": {
        "properties": {
          "cameraIds": {
            "description": "A list of IDs of the cameras to fetch the data for.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "endAt": {
            "description": "The non-inclusive upper bound of the time range for which to return data.",
            "format": "date-time",
            "type": "string"
          },
          "format": {
            "default": "csv",
            "description": "The format of returned data. Should be either `csv` or `json`. The default is `csv`.",
            "type": "string"
          },
          "startAt": {
            "description": "The include lower bound of the time range for which to return data.",
            "format": "date-time",
            "type": "string"
          },
          "timeGrain": {
            "default": "1h",
            "description": "The time window in the requested range to for data aggregation.",
            "enum": [
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "6h",
              "1d"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Site": {
        "properties": {
          "address": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "openingHour": {
            "type": "object",
            "x-go-type": {
              "hints": {
                "kind": "interface",
                "noValidation": true
              },
              "type": "hoxton.DayOpeningHour"
            },
            "nullable": true
          },
          "organisationId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          },
          "tz": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "TSAnalyticsMetadataResponse": {
        "properties": {
          "tables": {
            "items": {
              "$ref": "#/components/schemas/TSAnalyticsTableMetadata"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "TSAnalyticsRecord": {
        "properties": {
          "eventTime": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "metricLabel": {
            "readOnly": true,
            "type": "string"
          },
          "metricLabelGroup": {
            "readOnly": true,
            "type": "string"
          },
          "metricName": {
            "readOnly": true,
            "type": "string"
          },
          "metricType": {
            "readOnly": true,
            "type": "string"
          },
          "metricValue": {
            "format": "double",
            "readOnly": true,
            "type": "number",
            "nullable": true
          },
          "metricValueAvg": {
            "format": "double",
            "readOnly": true,
            "type": "number",
            "nullable": true
          },
          "metricValueMax": {
            "format": "double",
            "readOnly": true,
            "type": "number",
            "nullable": true
          },
          "metricValueSum": {
            "format": "double",
            "readOnly": true,
            "type": "number",
            "nullable": true
          },
          "site": {
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TSAnalyticsReportRequest": {
        "properties": {
          "endDate": {
            "description": "Upper bound of the date range (non-inclusive).",
            "format": "date-time",
            "type": "string"
          },
          "limit": {
            "default": 1000,
            "description": "Maximum number of records to return.",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "metricLabelGroups": {
            "description": "Filter by metric label groups.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "metricLabels": {
            "description": "Filter by metric labels.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "metricNames": {
            "description": "Filter by metric names.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "offset": {
            "default": 0,
            "description": "Number of records to skip for pagination.",
            "minimum": 0,
            "type": "integer"
          },
          "organisationId": {
            "description": "Scope the report to a specific organisation. Only honoured for callers\nwith read:report:all (support); ignored otherwise. Omit to use the\ncaller's own organisation.\n",
            "format": "uuid",
            "type": "string"
          },
          "siteIds": {
            "description": "Scope the report to specific sites by their UUIDs. Each site must be\none the caller is authorised to access. Omit to return all sites in\nthe caller's authorised scope.\n",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "startDate": {
            "description": "Lower bound of the date range (inclusive).",
            "format": "date-time",
            "type": "string"
          },
          "tableName": {
            "description": "The analytics table to query.",
            "enum": [
              "ts_doorway_hourly_unpivot",
              "ts_path_hourly_unpivot",
              "ts_people_count_monitors_hourly_unpivot",
              "ts_space_hourly_unpivot"
            ],
            "type": "string"
          },
          "timeGrain": {
            "description": "Time aggregation granularity. Hourly returns raw data, others aggregate.",
            "enum": [
              "hourly",
              "daily",
              "weekly",
              "monthly",
              "yearly"
            ],
            "type": "string"
          }
        },
        "required": [
          "endDate",
          "startDate",
          "tableName",
          "timeGrain"
        ],
        "type": "object"
      },
      "TSAnalyticsReportResponse": {
        "properties": {
          "hasMore": {
            "description": "Whether there are more records available.",
            "readOnly": true,
            "type": "boolean"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/TSAnalyticsRecord"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "TSAnalyticsSiteMetadata": {
        "properties": {
          "id": {
            "description": "Site UUID. Pairs with the report's siteIds.",
            "format": "uuid",
            "readOnly": true,
            "type": "string"
          },
          "metricLabels": {
            "description": "Distinct metric label values for the site.",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "name": {
            "description": "Site display name.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TSAnalyticsTableMetadata": {
        "properties": {
          "metricNames": {
            "description": "Distinct metric name values.",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "sites": {
            "description": "Sites available in the table, with their distinct metric labels.",
            "items": {
              "$ref": "#/components/schemas/TSAnalyticsSiteMetadata"
            },
            "readOnly": true,
            "type": "array"
          },
          "tableName": {
            "description": "The analytics table name.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TalkBackData": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "recordedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "talkbackDeviceId": {
            "description": "A ID of talkback device data for.",
            "format": "uuid",
            "type": "string"
          },
          "talkbackId": {
            "description": "A ID of talkback to fetch the data for.",
            "format": "uuid",
            "type": "string"
          },
          "transcript": {
            "type": "string"
          },
          "transcriptLang": {
            "type": "string"
          },
          "translated": {
            "type": "boolean"
          },
          "translation": {
            "type": "string"
          }
        }
      },
      "TalkBackDevice": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string",
            "nullable": true
          },
          "siteId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "deleted"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "TalkBackReportRequest": {
        "properties": {
          "endDate": {
            "description": "It is the upper bound of the date range for which to return data. The `endDate` is non-inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          },
          "startDate": {
            "description": "It is the lower bound of the date range for which to return data. The `startDate` is inclusive; i.e, the returned data will be for dates from `startDate` to `endDate-1`",
            "format": "date",
            "type": "string"
          },
          "talkbackDeviceId": {
            "description": "A ID of talkback to fetch the data for.",
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "User": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organisationId": {
            "format": "uuid",
            "type": "string"
          },
          "organisationName": {
            "type": "string",
            "nullable": true
          },
          "roles": {
            "items": {
              "enum": [
                "member",
                "manager",
                "admin",
                "analyst",
                "support"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "siteIds": {
            "description": "A list of IDs of the sites to user visibility.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "organisationId",
          "email",
          "firstName",
          "lastName"
        ],
        "type": "object"
      },
      "VideoUploadMetrics": {
        "properties": {
          "uploadSize": {
            "type": "integer"
          },
          "uploadTime": {
            "type": "number"
          }
        },
        "type": "object"
      }
    }
  }
}