Skip to content

Expose scientific observation enumerations via public API endpoints #1659

Description

@ClemRz

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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions