---
title: "Farm Flights"
method: GET
path: "/api/v1/farms/{farm_id}/flights"
tags: ["flights"]
---

# Farm Flights

`GET /api/v1/farms/{farm_id}/flights`

## Request

- Base URL: `https://api.brumby.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.brumby.com/api/v1/farms/{farm_id}/flights`
- Auth: HTTP bearer

Every flight of every dock ever installed at this farm, newest first.

THE FARM IS THE INSTALLATION, NOT THE DIRECTORY. There is no 404 for an
unknown farm here: installations carry the farm key in two spellings and
some of them name a GrazeMate farm FleetOps' own directory has never seen
(`services/farm_keys`), so "no rows" is the honest answer to both an empty
farm and a farm id nobody recognises.

Paging is keyset: pass the `cursor` from the previous page's last flight.
The token is `base64url("<started_at>|<flight_id>")` and both halves are in
every row, so a client that dropped it can rebuild it.

## Path parameters

- `farm_id` string, required

## Query parameters

- `limit` integer
- `cursor` string, nullable

## Response `200`

Successful Response

- FlightResponse[]
  - `flight_id` string, uuid, required
  - `device_id` string, required
  - `boot_id` string, uuid, required
  - `aircraft_id` string, nullable, required
  - `farm_id` string, nullable
  - `installation_id` string, uuid, nullable
  - `mission_request_id` string, uuid, nullable
  - `mission_id` string, nullable
  - `requested_by` string, nullable
  - `launched_by` string, nullable
  - `mission_config_sha256` string, nullable
  - `attribution_source` string, nullable
  - `customer_schedule_id` integer, nullable
  - `requested_by_account_id` integer, nullable
  - `started_at` string, date-time, required
  - `ended_at` string, date-time, nullable, required
  - `outcome` 'in_progress' | 'completed' | 'recalled' | 'interrupted' | 'unknown' | 'sim_ended', required: How a materialized flight ended. ``unknown`` is honest, not lazy: operations went stale mid-flight, so the dock-side truth was never observed. ``interrupted`` is a dock reboot while the flight row was open. ``sim_ended`` is a SIMULATED flight whose simulation was ended -- by the operator, a failure, or a runner that stopped reporting -- while the flight was open: the aircraft did not land, it stopped existing, and saying "completed" or "unknown" would each be a lie of a different kind. Only `services/sim_runs.close_out` writes it. No migration: `enum_type` is a plain String(20).
  - `end_reason` string, nullable, required
  - `track` FlightTrackPointResponse[], nullable
    - `ts` string, date-time, required
    - `lat_deg` number, required
    - `lon_deg` number, required
    - `alt_amsl_m` number, nullable, required
    - `rel_alt_m` number, nullable, required
    - `heading_deg` number, nullable, required
    - `groundspeed_ms` number, nullable, required
    - `source` string, required
  - `record_id` string, nullable
  - `run_ids` string[]
  - `media_count` integer

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/brumby/apis/brumby-platform-api.md) - [All operations](https://skmtc.dev/brumby/apis/brumby-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/brumby/apis/brumby-platform-api/revisions/fe185e20813e?raw)
