{
    "openapi": "3.0.2",
    "info": {
        "title": "Citylight API",
        "description": "Citylight API for smart streetlighting system.",
        "version": "2.3.8"
    },
    "servers": [
        {
            "url": "/backend/api/v2"
        }
    ],
    "paths": {
        "/luminaires": {
            "get": {
                "tags": [
                    "Luminaires"
                ],
                "summary": "Get All Luminaires",
                "description": "Return list of luminaires",
                "operationId": "get_all_luminaires_get",
                "parameters": [
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Offset",
                            "type": "integer"
                        },
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Limit",
                            "type": "integer"
                        },
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Ignore Entries Changed Before This Timestamp",
                            "type": "string",
                            "format": "date-time"
                        },
                        "name": "changed_after",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List Of All Luminaires (If Not Something Specific)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_citylight.api.devices._models.LuminaireInfo__"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [
                                        {
                                            "id": 1,
                                            "fk_controller": 1,
                                            "devicetype": "luminaires",
                                            "name": "Lennujaam 1",
                                            "description": "",
                                            "inventory_id": "",
                                            "latitude": 12.12345,
                                            "longitude": 12.12345,
                                            "dt_installation": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_maintenance": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_created": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_changed": "2020-05-16T12:30:00.123456+00:00",
                                            "fk_luminaire_type": 1,
                                            "installer": "",
                                            "warranty_time": 0,
                                            "safety_class": "I",
                                            "overvoltage_protection": 0,
                                            "pressure_valve": false,
                                            "clo_activated": false,
                                            "tags": [],
                                            "fk_area": 1,
                                            "settings": {},
                                            "config_status": ""
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/luminaires/{luminaire_id}": {
            "get": {
                "tags": [
                    "Luminaires"
                ],
                "summary": "Get Luminaire By ID",
                "description": "Get luminaire by ID",
                "operationId": "get_by_id_luminaires__luminaire_id__get",
                "parameters": [
                    {
                        "required": true,
                        "schema": {
                            "title": "Luminaire Id",
                            "type": "integer"
                        },
                        "name": "luminaire_id",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Luminaire Info",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_LuminaireInfo_"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": {
                                        "id": 1,
                                        "fk_controller": 1,
                                        "devicetype": "luminaires",
                                        "name": "Lennujaam 1",
                                        "description": "",
                                        "inventory_id": "",
                                        "latitude": 12.12345,
                                        "longitude": 12.12345,
                                        "dt_installation": "2020-05-16T12:30:00.123456+00:00",
                                        "dt_maintenance": "2020-05-16T12:30:00.123456+00:00",
                                        "dt_created": "2020-05-16T12:30:00.123456+00:00",
                                        "dt_changed": "2020-05-16T12:30:00.123456+00:00",
                                        "fk_luminaire_type": 1,
                                        "installer": "",
                                        "warranty_time": 0,
                                        "safety_class": "I",
                                        "overvoltage_protection": 0,
                                        "pressure_valve": false,
                                        "clo_activated": false,
                                        "tags": [],
                                        "fk_area": 1,
                                        "settings": {},
                                        "config_status": ""
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Luminaire not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 404,
                                    "errcode": 1,
                                    "message": "Luminaire not found"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/devices/status/history": {
            "get": {
                "tags": [
                    "Device Status"
                ],
                "summary": "Get All Devices' Status History",
                "description": "Get device status history for all devices passing filters",
                "operationId": "get_history_all_devices_status_history_get",
                "parameters": [
                    {
                        "required": false,
                        "schema": {
                            "title": "Start Of Period (optional)",
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                {
                                    "type": "string",
                                    "format": "date"
                                }
                            ]
                        },
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "End Of Period (optional)",
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                {
                                    "type": "string",
                                    "format": "date"
                                }
                            ]
                        },
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Offset",
                            "type": "integer"
                        },
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Limit",
                            "type": "integer"
                        },
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Areas To Filter By",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            },
                            "default": []
                        },
                        "name": "fk_area",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "History Of All Devices' Status",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_citylight.api.devices._models.DeviceStatusHistoryInfo__"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [
                                        {
                                            "fk_device": 1,
                                            "dt_production": "2020-05-16T12:30:00.123456+00:00",
                                            "output_level": 10
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/devices/status/history/{device_id}": {
            "get": {
                "tags": [
                    "Device Status"
                ],
                "summary": "Get Device Status History By ID",
                "description": "Get device status history by ID",
                "operationId": "get_history_by_id_devices_status_history__device_id__get",
                "parameters": [
                    {
                        "required": true,
                        "schema": {
                            "title": "Device Id",
                            "type": "integer"
                        },
                        "name": "device_id",
                        "in": "path"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Start Of Period (optional)",
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                {
                                    "type": "string",
                                    "format": "date"
                                }
                            ]
                        },
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "End Of Period (optional)",
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                {
                                    "type": "string",
                                    "format": "date"
                                }
                            ]
                        },
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Offset",
                            "type": "integer"
                        },
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Limit",
                            "type": "integer"
                        },
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "What Columns To Fetch",
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "name": "__fields__",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "History Of Device Status",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_citylight.api.devices._models.DeviceStatusHistoryInfo__"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [
                                        {
                                            "fk_device": 1,
                                            "dt_production": "2020-05-16T12:30:00.123456+00:00",
                                            "output_level": 10
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/sensors": {
            "get": {
                "tags": [
                    "Sensors"
                ],
                "summary": "Get All Sensors",
                "description": "Return list of sensors (with subsensor IDs)",
                "operationId": "get_all_sensors_get",
                "responses": {
                    "200": {
                        "description": "List Of All Sensors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_citylight.api.devices._models.SensorInfo__"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [
                                        {
                                            "id": 2,
                                            "fk_controller": 1,
                                            "fk_area": 1,
                                            "devicetype": "sensors",
                                            "name": "Sensor X",
                                            "description": "",
                                            "inventory_id": "",
                                            "latitude": 12.12345,
                                            "longitude": 12.12345,
                                            "settings": {},
                                            "dt_installation": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_maintenance": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_created": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_changed": "2020-05-16T12:30:00.123456+00:00",
                                            "fk_sensor_type": 1,
                                            "fk_parent": 1,
                                            "subsensors": []
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/sensors/{sensor_id}": {
            "get": {
                "tags": [
                    "Sensors"
                ],
                "summary": "Get Sensor By ID",
                "description": "Get sensor (with subsensor IDs) by ID",
                "operationId": "get_by_id_sensors__sensor_id__get",
                "parameters": [
                    {
                        "required": true,
                        "schema": {
                            "title": "Sensor Id",
                            "type": "integer"
                        },
                        "name": "sensor_id",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sensor Info",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_SensorInfo_"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": {
                                        "id": 2,
                                        "fk_controller": 1,
                                        "fk_area": 1,
                                        "devicetype": "sensors",
                                        "name": "Sensor X",
                                        "description": "",
                                        "inventory_id": "",
                                        "latitude": 12.12345,
                                        "longitude": 12.12345,
                                        "settings": {},
                                        "dt_installation": "2020-05-16T12:30:00.123456+00:00",
                                        "dt_maintenance": "2020-05-16T12:30:00.123456+00:00",
                                        "dt_created": "2020-05-16T12:30:00.123456+00:00",
                                        "dt_changed": "2020-05-16T12:30:00.123456+00:00",
                                        "fk_sensor_type": 1,
                                        "fk_parent": 1,
                                        "subsensors": []
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Could not find requested record",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 404,
                                    "errcode": 1,
                                    "message": "Could not find requested record"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/reference/luminairetypes": {
            "get": {
                "tags": [
                    "Luminaire Types"
                ],
                "summary": "Get All Luminaire Types",
                "description": "Return all luminaire types",
                "operationId": "get_all_reference_luminairetypes_get",
                "responses": {
                    "200": {
                        "description": "List Of All Luminaire Types",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_citylight.api.reference._models.LuminaireTypeInfo__"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [
                                        {
                                            "id": 1,
                                            "name": "Philips BGP 340",
                                            "manufacturer": "Philips",
                                            "model": "Philips BGP 340",
                                            "rated_power": 70,
                                            "lumens": 4500,
                                            "alarm_temperature": 65,
                                            "ip_rating": 66,
                                            "ik_rating": 8,
                                            "style": "",
                                            "physical_type": "",
                                            "simulated": false,
                                            "dt_created": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_changed": "2020-05-16T12:30:00.123456+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/reference/luminairetypes/{luminaire_type_id}": {
            "get": {
                "tags": [
                    "Luminaire Types"
                ],
                "summary": "Get Luminaire Type By ID",
                "description": "Get luminaire type name and other data by luminaire type ID",
                "operationId": "get_by_id_reference_luminairetypes__luminaire_type_id__get",
                "parameters": [
                    {
                        "required": true,
                        "schema": {
                            "title": "Luminaire Type Id",
                            "type": "integer"
                        },
                        "name": "luminaire_type_id",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Luminaire Type Info",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_LuminaireTypeInfo_"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": {
                                        "id": 1,
                                        "name": "Philips BGP 340",
                                        "manufacturer": "Philips",
                                        "model": "Philips BGP 340",
                                        "rated_power": 70,
                                        "lumens": 4500,
                                        "alarm_temperature": 65,
                                        "ip_rating": 66,
                                        "ik_rating": 8,
                                        "style": "",
                                        "physical_type": "",
                                        "simulated": false,
                                        "dt_created": "2020-05-16T12:30:00.123456+00:00",
                                        "dt_changed": "2020-05-16T12:30:00.123456+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Could not find requested record",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 404,
                                    "errcode": 1,
                                    "message": "Could not find requested record"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/dataviews/movement/data": {
            "get": {
                "tags": [
                    "Movement Data"
                ],
                "summary": "Get Movement Data For All Sensors",
                "description": "Return movement event counts from all devices over period by interval.",
                "operationId": "get_all_movement_data_dataviews_movement_data_get",
                "parameters": [
                    {
                        "required": false,
                        "schema": {
                            "title": "Start Of The Sampling Period",
                            "type": "string",
                            "format": "date-time"
                        },
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "End Of The Sampling Period",
                            "type": "string",
                            "format": "date-time"
                        },
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Interval For Grouping Events, In Seconds",
                            "type": "integer",
                            "default": 60
                        },
                        "name": "interval",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sensors movement data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_dict_str__Any___"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [{
                                        "count": 58,
                                        "dt": "2020-05-16T12:30:00+00:00"
                                    }]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/dataviews/movement/data/{sensor_id}": {
            "get": {
                "tags": [
                    "Movement Data"
                ],
                "summary": "Get Movement Data For Sensor By ID",
                "description": "Return movement event counts by device ID over period by interval.",
                "operationId": "get_movement_data_by_id_dataviews_movement_data__sensor_id__get",
                "parameters": [
                    {
                        "required": true,
                        "schema": {
                            "title": "Sensor Id",
                            "type": "integer"
                        },
                        "name": "sensor_id",
                        "in": "path"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Start Of The Sampling Period",
                            "type": "string",
                            "format": "date-time"
                        },
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "End Of The Sampling Period",
                            "type": "string",
                            "format": "date-time"
                        },
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Interval For Grouping Events, In Seconds",
                            "type": "integer",
                            "default": 60
                        },
                        "name": "interval",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Sensor movement data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_dict_str__Any___"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [
                                        {
                                            "count": 58,
                                            "dt": "2020-05-16T12:30:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Sensor does not exist",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 404,
                                    "errcode": 1,
                                    "message": "Sensor does not exist"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/events": {
            "get": {
                "tags": [
                    "Events"
                ],
                "summary": "Get All Events",
                "description": "Return list of events matching query.",
                "operationId": "get_all_events_get",
                "parameters": [
                    {
                        "required": false,
                        "schema": {
                            "title": "Events Of Internal Or Non-Internal Type (empty = all)",
                            "type": "boolean"
                        },
                        "name": "internal",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Event Types (empty = all)",
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "name": "fk_event_type",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Start Of Period (optional)",
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                {
                                    "type": "string",
                                    "format": "date"
                                }
                            ]
                        },
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "End Of Period (optional)",
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                {
                                    "type": "string",
                                    "format": "date"
                                }
                            ]
                        },
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Devices To Filter By (optional)",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "name": "fk_device",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Areas To Filter By (optional)",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "name": "fk_area",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Groups To Filter By (optional)",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "name": "fk_group",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Offset",
                            "type": "integer"
                        },
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Limit",
                            "type": "integer",
                            "default": 10000
                        },
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of all events",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_dict_str__Any___"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [
                                        {
                                            "dt_arrival": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_production": "2020-05-16T12:29:00+00:00",
                                            "fk_device": 1,
                                            "fk_event_type": "dt_movement_count",
                                            "fk_subsensor": null,
                                            "id": 6373,
                                            "value": 58
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        },
        "/events/{device_id}": {
            "get": {
                "tags": [
                    "Events"
                ],
                "summary": "Get Events For Device By ID",
                "description": "Get events for single device by ID.",
                "operationId": "get_by_id_events__device_id__get",
                "parameters": [
                    {
                        "required": true,
                        "schema": {
                            "title": "Device Id",
                            "type": "integer"
                        },
                        "name": "device_id",
                        "in": "path"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Events Of Internal Or Non-Internal Type (empty = all)",
                            "type": "boolean"
                        },
                        "name": "internal",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Event Types (empty = all)",
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "name": "fk_event_type",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Start Of Period (optional)",
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                {
                                    "type": "string",
                                    "format": "date"
                                }
                            ]
                        },
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "End Of Period (optional)",
                            "anyOf": [
                                {
                                    "type": "string",
                                    "format": "date-time"
                                },
                                {
                                    "type": "string",
                                    "format": "date"
                                }
                            ]
                        },
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Offset",
                            "type": "integer"
                        },
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "required": false,
                        "schema": {
                            "title": "Pagination Limit",
                            "type": "integer",
                            "default": 10000
                        },
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of device's events",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CitylightResponse_list_dict_str__Any___"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 200,
                                    "errcode": 0,
                                    "message": "",
                                    "data": [
                                        {
                                            "dt_arrival": "2020-05-16T12:30:00.123456+00:00",
                                            "dt_production": "2020-05-16T12:29:00+00:00",
                                            "fk_device": 1,
                                            "fk_event_type": "dt_movement_count",
                                            "fk_subsensor": null,
                                            "id": 6373,
                                            "value": 58
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmptyCitylightResponse"
                                },
                                "example": {
                                    "envelope_version": 2,
                                    "status": 500,
                                    "errcode": 1,
                                    "message": "Failed to GET /api/endpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Problems With Authentication",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Not authenticated/Invalid credentials"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Insufficent Privileges",
                        "content": {
                            "application/json": {
                                "example": {
                                    "detail": "Insufficent privileges"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBasic": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "CitylightResponse_LuminaireInfo_": {
                "title": "CitylightResponse[LuminaireInfo]",
                "required": [
                    "data"
                ],
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "Actual Data",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/LuminaireInfo"
                            }
                        ]
                    }
                },
                "description": ""
            },
            "CitylightResponse_LuminaireTypeInfo_": {
                "title": "CitylightResponse[LuminaireTypeInfo]",
                "required": [
                    "data"
                ],
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "Actual Data",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/LuminaireTypeInfo"
                            }
                        ]
                    }
                },
                "description": ""
            },
            "CitylightResponse_SensorInfo_": {
                "title": "CitylightResponse[SensorInfo]",
                "required": [
                    "data"
                ],
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "Actual Data",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/SensorInfo"
                            }
                        ]
                    }
                },
                "description": ""
            },
            "CitylightResponse_list_citylight.api.devices._models.DeviceStatusHistoryInfo__": {
                "title": "CitylightResponse[list[citylight.api.devices._models.DeviceStatusHistoryInfo]]",
                "required": [
                    "data"
                ],
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "Actual Data",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/DeviceStatusHistoryInfo"
                        }
                    }
                },
                "description": ""
            },
            "CitylightResponse_list_citylight.api.devices._models.LuminaireInfo__": {
                "title": "CitylightResponse[list[citylight.api.devices._models.LuminaireInfo]]",
                "required": [
                    "data"
                ],
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "Actual Data",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LuminaireInfo"
                        }
                    }
                },
                "description": ""
            },
            "CitylightResponse_list_citylight.api.devices._models.SensorInfo__": {
                "title": "CitylightResponse[list[citylight.api.devices._models.SensorInfo]]",
                "required": [
                    "data"
                ],
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "Actual Data",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/SensorInfo"
                        }
                    }
                },
                "description": ""
            },
            "CitylightResponse_list_citylight.api.reference._models.LuminaireTypeInfo__": {
                "title": "CitylightResponse[list[citylight.api.reference._models.LuminaireTypeInfo]]",
                "required": [
                    "data"
                ],
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "Actual Data",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LuminaireTypeInfo"
                        }
                    }
                },
                "description": ""
            },
            "CitylightResponse_list_dict_str__Any___": {
                "title": "CitylightResponse[list[dict[str, Any]]]",
                "required": [
                    "data"
                ],
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "Actual Data",
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    }
                },
                "description": ""
            },
            "DeviceStatusHistoryInfo": {
                "title": "DeviceStatusHistoryInfo",
                "type": "object",
                "properties": {
                    "id": {
                        "title": "Status History Record ID",
                        "type": "integer"
                    },
                    "fk_device": {
                        "title": "Associated Device ID",
                        "type": "integer"
                    },
                    "fk_controller": {
                        "title": "Associated Controller ID",
                        "type": "integer"
                    },
                    "dt_production": {
                        "title": "When History Record Was Produced",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_arrival": {
                        "title": "When History Record Arrived",
                        "type": "string",
                        "format": "date-time"
                    },
                    "output_level": {
                        "title": "Percents",
                        "type": "integer"
                    },
                    "phase_power": {
                        "title": "Watts",
                        "type": "number"
                    },
                    "phase_voltage": {
                        "title": "Volts",
                        "type": "number"
                    },
                    "phase_current": {
                        "title": "Amperes",
                        "type": "number"
                    },
                    "energy_total": {
                        "title": "Watt-hours",
                        "type": "number"
                    },
                    "uptime_total": {
                        "title": "Time Device Has Been Under Power In Seconds",
                        "type": "integer"
                    },
                    "temperature": {
                        "title": "Celsius",
                        "type": "number"
                    },
                    "dt_created": {
                        "title": "When History Record Was Created",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_changed": {
                        "title": "When History Record Was Changed",
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "description": ""
            },
            "EmptyCitylightResponse": {
                "title": "EmptyCitylightResponse",
                "type": "object",
                "properties": {
                    "envelope_version": {
                        "title": "Data Envelope Version",
                        "enum": [
                            2
                        ],
                        "type": "integer",
                        "const": 2
                    },
                    "status": {
                        "title": "HTTP Status Code",
                        "type": "integer",
                        "default": 200
                    },
                    "errcode": {
                        "title": "Error Code",
                        "type": "integer",
                        "default": 0
                    },
                    "message": {
                        "title": "Error Message",
                        "type": "string",
                        "default": ""
                    },
                    "data": {
                        "title": "No Data"
                    }
                },
                "description": ""
            },
            "LuminaireInfo": {
                "title": "LuminaireInfo",
                "required": [
                    "id",
                    "fk_controller",
                    "fk_cabinet",
                    "name",
                    "description",
                    "inventory_id",
                    "latitude",
                    "longitude",
                    "dt_installation",
                    "dt_maintenance",
                    "dt_created",
                    "dt_changed",
                    "fk_luminaire_type",
                    "fk_distributor",
                    "installer",
                    "warranty_time",
                    "safety_class",
                    "overvoltage_protection",
                    "pressure_valve",
                    "clo_activated",
                    "fk_area",
                    "settings",
                    "config_status",
                    "lifetime",
                    "tags"
                ],
                "type": "object",
                "properties": {
                    "id": {
                        "title": "Luminaire ID",
                        "type": "integer"
                    },
                    "fk_controller": {
                        "title": "Unique Luminaire Controller ID, If Any",
                        "type": "integer"
                    },
                    "fk_cabinet": {
                        "title": "Luminaire Cabinet ID, If Any",
                        "type": "integer"
                    },
                    "devicetype": {
                        "title": "Type Of Device ('luminaires')",
                        "enum": [
                            "luminaires"
                        ],
                        "type": "string",
                        "default": "luminaires"
                    },
                    "name": {
                        "title": "Luminaire Name",
                        "type": "string"
                    },
                    "description": {
                        "title": "Luminaire Description",
                        "type": "string"
                    },
                    "inventory_id": {
                        "title": "Inventory Identifier",
                        "type": "string"
                    },
                    "latitude": {
                        "title": "Luminaire Latitude",
                        "type": "number"
                    },
                    "longitude": {
                        "title": "Luminaire Longitude",
                        "type": "number"
                    },
                    "dt_installation": {
                        "title": "When Luminaire Was Installed",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_maintenance": {
                        "title": "When Luminaire Was Last Maintained",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_created": {
                        "title": "When Luminaire Was Created",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_changed": {
                        "title": "When Luminaire Was Changed",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_deleted": {
                        "title": "When Luminaire Was Deleted",
                        "type": "null"
                    },
                    "fk_luminaire_type": {
                        "title": "Luminaire Type",
                        "type": "integer"
                    },
                    "fk_distributor": {
                        "title": "Luminaire Distributor",
                        "type": "integer"
                    },
                    "installer": {
                        "title": "Info On Luminaire Installer",
                        "type": "string"
                    },
                    "warranty_time": {
                        "title": "Warranty Time In Years",
                        "type": "integer"
                    },
                    "safety_class": {
                        "title": "Safety Class: I, II or III",
                        "enum": [
                            "",
                            "I",
                            "II",
                            "III"
                        ],
                        "type": "string"
                    },
                    "overvoltage_protection": {
                        "title": "Overvoltage Protection In kV",
                        "type": "integer"
                    },
                    "pressure_valve": {
                        "title": "Whether Luminaire Has Pressure Valve",
                        "type": "boolean"
                    },
                    "clo_activated": {
                        "title": "Is Constant Light Output Activated",
                        "type": "boolean"
                    },
                    "fk_area": {
                        "title": "Luminaire Area ID",
                        "type": "integer"
                    },
                    "settings": {
                        "title": "Miscellaneous Luminaire-related Settings",
                        "type": "object"
                    },
                    "config_status": {
                        "title": "Luminaire Config Status",
                        "type": "string"
                    },
                    "lifetime": {
                        "title": "Luminaire Lifetime",
                        "type": "integer"
                    },
                    "tags": {
                        "title": "List Of Luminaire Tag IDs",
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                }
            },
            "LuminaireTypeInfo": {
                "title": "LuminaireTypeInfo",
                "required": [
                    "id",
                    "name",
                    "manufacturer",
                    "model",
                    "rated_power",
                    "lumens",
                    "alarm_temperature",
                    "color_temperature",
                    "ip_rating",
                    "ik_rating",
                    "power_factor",
                    "maintenance_factor",
                    "led_current",
                    "style",
                    "physical_type",
                    "simulated",
                    "dt_created",
                    "dt_changed"
                ],
                "type": "object",
                "properties": {
                    "id": {
                        "title": "Luminaire Type ID",
                        "type": "integer"
                    },
                    "name": {
                        "title": "Luminaire Type Name/Description",
                        "type": "string"
                    },
                    "manufacturer": {
                        "title": "Manufacturer",
                        "type": "string"
                    },
                    "model": {
                        "title": "Model",
                        "type": "string"
                    },
                    "rated_power": {
                        "title": "Rated Power In Watts",
                        "type": "integer"
                    },
                    "lumens": {
                        "title": "Luminaire Total Lumen Output",
                        "type": "integer"
                    },
                    "alarm_temperature": {
                        "title": "Alarm Temperature",
                        "type": "integer"
                    },
                    "color_temperature": {
                        "title": "Luminaire Color Temperature, 4..5 Digits",
                        "type": "number"
                    },
                    "ip_rating": {
                        "title": "Luminaire International Protection Rating, Two Digits",
                        "type": "number"
                    },
                    "ik_rating": {
                        "title": "Luminaire Kinetic Impact Rating, Two Digits",
                        "type": "number"
                    },
                    "power_factor": {
                        "title": "Luminaire Power Factor, <1, Two Digits",
                        "type": "number"
                    },
                    "maintenance_factor": {
                        "title": "Luminaire Maintenance Factor, 5..6 Digits",
                        "type": "integer"
                    },
                    "led_current": {
                        "title": "Luminaire LED Current",
                        "type": "number"
                    },
                    "style": {
                        "title": "Luminaire CSS Name",
                        "type": "string"
                    },
                    "physical_type": {
                        "title": "Luminaire Physical Type Characteristics",
                        "type": "string"
                    },
                    "simulated": {
                        "title": "Whether This Type Is Simulated",
                        "type": "boolean"
                    },
                    "dt_created": {
                        "title": "When Luminaire Type Was Created",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_changed": {
                        "title": "When Luminaire Type Was Changed",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_deleted": {
                        "title": "When Luminaire Type Was Deleted",
                        "type": "null"
                    }
                }
            },
            "SensorInfo": {
                "title": "SensorInfo",
                "required": [
                    "id",
                    "fk_controller",
                    "fk_cabinet",
                    "name",
                    "description",
                    "inventory_id",
                    "latitude",
                    "longitude",
                    "dt_installation",
                    "dt_maintenance",
                    "dt_created",
                    "dt_changed",
                    "fk_sensor_type",
                    "fk_parent",
                    "fk_area",
                    "settings",
                    "subsensors"
                ],
                "type": "object",
                "properties": {
                    "id": {
                        "title": "Sensor ID",
                        "type": "integer"
                    },
                    "fk_controller": {
                        "title": "Unique Sensor Controller ID, If Any",
                        "type": "integer"
                    },
                    "fk_cabinet": {
                        "title": "Sensor Cabinet ID, If Any",
                        "type": "integer"
                    },
                    "devicetype": {
                        "title": "Type Of Device ('sensors')",
                        "enum": [
                            "sensors"
                        ],
                        "type": "string",
                        "default": "sensors"
                    },
                    "name": {
                        "title": "Sensor Name",
                        "type": "string"
                    },
                    "description": {
                        "title": "Sensor Description",
                        "type": "string"
                    },
                    "inventory_id": {
                        "title": "Inventory Identifier",
                        "type": "string"
                    },
                    "latitude": {
                        "title": "Sensor Latitude",
                        "type": "number"
                    },
                    "longitude": {
                        "title": "Sensor Longitude",
                        "type": "number"
                    },
                    "dt_installation": {
                        "title": "When Sensor Was Installed",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_maintenance": {
                        "title": "When Sensor Was Last Maintained",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_created": {
                        "title": "When Sensor Was Created",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_changed": {
                        "title": "When Sensor Was Changed",
                        "type": "string",
                        "format": "date-time"
                    },
                    "dt_deleted": {
                        "title": "When Sensor Was Deleted",
                        "type": "null"
                    },
                    "fk_sensor_type": {
                        "title": "Sensor Type ID",
                        "type": "integer"
                    },
                    "fk_parent": {
                        "title": "Sensor Parent ID, If Any",
                        "type": "integer"
                    },
                    "fk_area": {
                        "title": "Sensor Area ID",
                        "type": "integer"
                    },
                    "settings": {
                        "title": "Miscellaneous Sensor-Related Settings",
                        "type": "object"
                    },
                    "subsensors": {
                        "title": "List Of Subsensor IDs",
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "HTTPBasic": {
                "type": "http",
                "scheme": "basic"
            }
        }
    },
    "tags": [
        {
            "name": "Luminaire Types",
            "description": "Operations with luminaire types."
        },
        {
            "name": "Luminaires",
            "description": "Operations with luminaires (**device**)."
        },
        {
            "name": "Sensors",
            "description": "Operations with sensors (**device**)."
        },
        {
            "name": "Device Status",
            "description": "Data about devices' status."
        },
        {
            "name": "Movement Data",
            "description": "Movement data from sensors."
        },
        {
            "name": "Events",
            "description": "Operations with events from devices."
        }
    ]
}