---
title: "Query Flight Task Alert Records"
method: GET
path: "/openapi/v2.0/flight-alerts"
tags: ["Flight Task/AI Flight Alerts", "Flight Task/AI Flight Alerts (Cross-Domain)"]
---

# Query Flight Task Alert Records

`GET /openapi/v2.0/flight-alerts`

## Request

- Base URL: `` (relative, and it does not resolve against the document’s source URL)
- URL: `/openapi/v2.0/flight-alerts`
- Auth: none required

Paginated query of AI alert counts per flight by UAV SN and time range. This endpoint aggregates by **flight dimension** — each row returns a flight_id with its total alert count, not individual alert details.

## Query parameters

- `drone_sn` string, required
- `begin_at` integer
- `end_at` integer
- `algorithm_source` integer
- `algorithm_sources[]` integer[]
- `page` integer
- `page_size` integer

## Headers

- `X-User-Token` string, required
- `X-Project-Uuid` string, required
- `X-Request-Id` string
- `X-Language` string

## Response `200`

Success

- object
  - `code` integer: Non-zero indicates exception
  - `message` string: Message prompt
  - `data` object: Paginated data container
    - `data` object[]: Alert grouping list, aggregated by flight, one row per flight
      - `flight_id` string, uuid: Flight UUID
      - `count` integer: AI alert count for this flight
      - `flight_task_name` string: Flight task name
      - `flight_task_type` 0 | 1 | 2: Task type: 0=unknown, 1=wayline task, 2=command task
      - `start_time` integer: Flight takeoff time, seconds-level Unix timestamp; falls back to this flight's latest alert timestamp when unavailable
      - `status` 0 | 1: Task active state: 1=unfinished (pending/executing/paused/preparing/queued for takeoff, etc.), 0=finished or default. Note: only the first row of the returned list is queried and populated with the real status; all other rows are always 0 and do not indicate the task has finished. To get per-flight task status, call the task-detail endpoint with flight_id.
      - `is_commented` boolean: Whether this flight has been commented on
    - `total` integer: Total flight count matching the criteria (note: this is the flight count, not the total alert count)
    - `page` integer: Current page number
    - `page_size` integer: Items per page
    - `page_count` integer: Total pages = ceil(total / page_size)

## Other responses

- `400`: Invalid request parameters (incorrect format, missing required fields, etc.)
- `401`: Authentication failed (token invalid or expired)
- `403`: Insufficient permission (token does not have the corresponding permission in this project/organization)
- `500`: Server internal error

---

[API](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud.md) - [All operations](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud/revisions/aeef0010be34?raw)
