Endpoint
Request Parameters
This endpoint accepts no parameters.Response
The endpoint returns an HTML page rendered from theregistros.html template, populated with all records from data/registros.csv.
Status Code: 200 OK
Content-Type: text/html
Response Data Structure
The template receives aregistros variable containing a list of dictionaries with the following fields:
Unique identifier for the record (auto-incremented)
Timestamp when the record was created, in format
YYYY-MM-DD HH:MM:SSExtracted license plate number (uppercase, alphanumeric + hyphens, max 10 chars)
Name of the vehicle owner (may be empty)
Type of vehicle (e.g., “Sedan”, “SUV”, may be empty)
Additional notes or observations (may be empty)
Filename of the uploaded image stored in
uploads/ directoryData Source
Records are read fromdata/registros.csv using Python’s CSV DictReader:
Request Examples
- cURL
- Python Requests
- JavaScript Fetch
- Browser
Sample CSV Data
Example of the data structure returned:HTML Template Structure
Theregistros.html template typically includes:
- A table displaying all records
- Image thumbnails linked to full-size images via
/uploads/<filename> - Delete buttons for each record linking to
/eliminar/<id> - A download CSV button linking to
/descargar - Navigation back to the home page
Accessing Images
Images referenced in theimagen field can be accessed via:
Empty State
If no records exist in the database, the endpoint still returns successfully (200 OK) but with an empty list. The template should handle this gracefully by displaying a “No records found” message.Programmatic Access
This endpoint returns HTML. For programmatic access to record data, use the Download CSV endpoint to get raw CSV data, or parse the HTML response.
Performance Considerations
- File I/O: The CSV file is read completely into memory on each request
- Scalability: For large datasets (1000+ records), consider using a proper database (SQLite, PostgreSQL)
- Caching: No caching is implemented; every request reads from disk
- Pagination: Not implemented; all records are loaded at once
Related Endpoints
Upload Plate
Add new records to the database
Delete Record
Remove a specific record
Download CSV
Export all records in CSV format
View Image
Access uploaded images
