MD_LIST_FLIGHT_VERSIONS
Preview
This feature is in preview and is subject to change.
Returns every FlightVersion for a single Flight, newest first. Use this to browse the history of config, token, secrets, and timeout changes.
Rows carry version metadata only. The source columns (source_code, requirements_txt) are not returned, so listing a long history doesn't pull a Python file per row — read those for one version with MD_GET_FLIGHT_VERSION.
Syntax
SELECT * FROM MD_LIST_FLIGHT_VERSIONS(
flight_id := '<flight_id>',
"LIMIT" := <n>,
"OFFSET" := <n>
);
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
flight_id | UUID | Yes | Identifier of the Flight. | |
LIMIT | UINTEGER | No | 50 | Maximum number of versions to return. |
OFFSET | UINTEGER | No | 0 | Skip this many versions before returning. |
LIMIT and OFFSET are SQL keywords and must be quoted when used as named arguments.
Return columns
| Column | Type | Description |
|---|---|---|
version_id | UUID | Identifier of this version. |
flight_id | UUID | Flight identifier. |
flight_version | UINTEGER | Version number, newest first. |
created_at | TIMESTAMP WITH TIME ZONE | When this version was created. |
access_token_name | VARCHAR | Access token label for this version. |
flight_secret_names | VARCHAR[] | Secret names list for this version. |
config | MAP(VARCHAR, VARCHAR) | Config map for this version. |
max_runtime_sec | UINTEGER | Per-run timeout in seconds. 0 means no timeout. |
Examples
Get the full version history:
SELECT flight_version, created_at, access_token_name
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>');
Just the latest version:
SELECT flight_version, created_at
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>', "LIMIT" := 1);
Skip the latest, get the rest:
SELECT flight_version, created_at
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>', "OFFSET" := 1);
Find which versions changed the per-run timeout:
SELECT flight_version, created_at, max_runtime_sec
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>');
Related
MD_GET_FLIGHT_VERSION— Fetch a single version by number.MD_LIST_FLIGHT_RUNS— Each run row includes theflight_versionit used.list_flight_versionsMCP tool — AI-agent equivalent.