Summary
Create public API endpoints to expose enumeration/reference tables used by the scientific observation domain so the front-end doesn't need to hardcode them.
Enumeration Tables
| Table |
Description |
Example values |
t_quantity_kind |
Physical quantities |
Temperature, Pressure, RelativeHumidity, CO2Concentration, WaterLevel |
t_unit |
Measurement units |
°C, K, hPa, Pa, %, ppm, m, mm |
t_medium |
Sampling media |
air, water, soil, sediment, cave_wall |
t_observation_type |
Observation classifications |
physical_measurements |
t_human_activity_type |
Human activity types |
tourism, scientific_research |
t_contaminant_type |
Contaminant types |
heavy_metal, organic_compound |
Proposed Endpoints
GET /api/v1/enums/quantity-kinds
GET /api/v1/enums/units
GET /api/v1/enums/media
GET /api/v1/enums/observation-types
GET /api/v1/enums/human-activity-types
GET /api/v1/enums/contaminant-types
Or a single consolidated endpoint:
GET /api/v1/enums?types=quantityKinds,units,media
Requirements
- Public access (no authentication required)
- Cacheable (these change very rarely — consider
Cache-Control headers)
- Return
id, code, and any display fields (symbol, URL, etc.)
- Document in Swagger
Priority
Medium — the front-end can hardcode these for the initial release, but a proper API endpoint avoids drift between front-end and back-end as enumerations evolve.
Summary
Create public API endpoints to expose enumeration/reference tables used by the scientific observation domain so the front-end doesn't need to hardcode them.
Enumeration Tables
t_quantity_kindt_unitt_mediumt_observation_typet_human_activity_typet_contaminant_typeProposed Endpoints
Or a single consolidated endpoint:
Requirements
Cache-Controlheaders)id,code, and any display fields (symbol, URL, etc.)Priority
Medium — the front-end can hardcode these for the initial release, but a proper API endpoint avoids drift between front-end and back-end as enumerations evolve.