Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/GaelCeballos/Smart_Enviro_Backend/llms.txt

Use this file to discover all available pages before exploring further.

Permanently deletes a sensor reading by ID. This is a hard delete — the record is removed from the sensor_data table and cannot be recovered. Intended for administrative use to correct data entry errors or clean up stale readings.

Endpoint

DELETE /api/sensor-data/{id} Auth: None required per route configuration. This is part of the public apiResource registration.
This is a permanent, hard delete. Deleted sensor readings cannot be recovered. There is no soft-delete or archival mechanism on the sensor_data model. Use with caution — prefer archival strategies over deletion in production environments where historical data integrity is important.

Path Parameters

id
integer
required
The numeric primary key of the sensor reading to permanently delete. Must correspond to an existing record in the sensor_data table.

Example Request

curl -X DELETE http://localhost/api/sensor-data/42

Responses

200 OK

The reading was found and permanently removed from the database.
{"status": "success", "message": "Lectura eliminada permanentemente"}
status
string
Always "success" on a 200 response.
message
string
Confirmation message: "Lectura eliminada permanentemente".

404 Not Found

No sensor reading with the given id exists in the database.
{"status": "error", "message": "Lectura no encontrada"}
status
string
Always "error" on a 404 response.
message
string
Error message: "Lectura no encontrada".

Build docs developers (and LLMs) love