Skip to content

Endpoint to export alerts as CSV for a given period #521

@fe51

Description

@fe51

Pitch

As a first iteration on this topic, we want to expose an endpoint that allows exporting alerts (or sequences) over a given time range (as csv)

What to do

Create an endpoint that:

  • Takes two dates as input (start_date, end_date)
  • Returns a CSV file containing the list of alerts within that period

Data

The CSV should include the following columns from the alert table (excluding orga_id):

  • id (int, not null)
  • lat (float)
  • lon (float)
  • started_at (timestamp, not null)
  • last_seen_at (timestamp, not null)

Future improvements

In a second iteration, we will enrich the export with additional columns, such as:

  • Related sequence IDs
  • Associated camera names for each alert

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions