Skip to content

bring new format field to events endpoint tobe able to eventsapi simp…#498

Open
mudhoney wants to merge 2 commits into
Helioviewer-Project:mainfrom
mudhoney:feature/flat-events
Open

bring new format field to events endpoint tobe able to eventsapi simp…#498
mudhoney wants to merge 2 commits into
Helioviewer-Project:mainfrom
mudhoney:feature/flat-events

Conversation

@mudhoney

Copy link
Copy Markdown
Contributor

Add format=tree|flat parameter to events action

  • New format query parameter on ?action=events: defaults to tree (existing nested-category behaviour) or flat to fetch from the new v1 per-source endpoint.
  • Adds EventsApi::getEventsForSource() (declared on EventsApiInterface), which hits /api/v1/events/{source}/observation/{ISO-8601-Z} and mirrors the Legacy method's Sentry/exception handling.
  • SolarEvents::events() now picks the right backend based on format; the hardcoded ['CCMC','HEK','RHESSI'] list is replaced with EventsApi::VALID_SOURCES so future additions need one edit.
  • Input validation accepts format as an optional choice restricted to {tree, flat} — anything else is rejected at the validator and the controller defensively falls back to tree.

mudhoney added 2 commits June 10, 2026 15:38
…le event search will simplify our system , step to eventually remove tree format event responses, which brings unneccessary complication to our codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant