Repository navigation
API Documentation
This endpoint delivers a list of all known sensors stored in the MongoDB database.
This function is primarily intended for use when initializing the user interface component at the start of an experiment. Additionally, it can be utilized for refreshing the UI or handling errors that necessitate a restart of the frontend.
GET /storedDataThe response is a JSON array containing information about all known sensors.
GET https://localhost:8000/storedData[
[
{
"_id": "65e6515983c7b2f105ca749b",
"temperature": 200,
"time": "200",
"__v": 0
},
{
"_id": "65e6515d55ac1d9d8eef16d1",
"temperature": 20,
"time": "20",
},
{
"_id": "65e6515f55ac1d9d8eef16d2",
"temperature": 20,
"time": "20",
},
{
"_id": "65e6516155ac1d9d8eef16d3",
"temperature": 20,
"time": "20", },
{
"_id": "65e6516a83c7b2f105ca74a3",
"temperature": 200,
"time": "200",
"__v": 0
},
{
"_id": "65e6521283c7b2f105ca74ab",
"temperature": 200,
"time": "200",
"__v": 0
},
],
[
{
"_id": "65e6515b55ac1d9d8eef16d0",
"temperature": 20,
"time": "20",
},
],
[
{
"_id": "65f2d8b23ddfb319a3e56c76",
"temperature": 200,
"time": "200",
"__v": 0
}
],
[],
[],
[]
]When mounting the UI component at the start of the experiment or when handling UI refreshes or errors that require a frontend restart, utilize this endpoint to fetch the necessary sensor data.

GET /storedData_latest/:sensorname/:idThe response is a JSON array containing information about the sensor data newer than the specified header ID.
GET https://localhost:8000/storedData_latest/Sensor1/6602a19c2d76cc5bcd9ede51[
{
"_id": "sensor_id_placeholder",
"temperature": temperature_value,
"time": "time_value",
"__v": 0
},
{
"_id": "sensor_id_placeholder",
"temperature": temperature_value,
"time": "time_value",
"__v": 0
},
{
"_id": "sensor_id_placeholder",
"temperature": temperature_value,
"time": "time_value",
"__v": 0
}
]This endpoint should be utilized to retrieve sensor data newer than the specified header ID in the UI component for real-time updates or data synchronization purposes.
