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 source, requirements, config, token, and secrets changes.
Syntax
SELECT * FROM MD_LIST_FLIGHT_VERSIONS(
flight_id := '<flight_id>',
"LIMIT" := <n>,
"OFFSET" := <n>
);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
flight_id | UUID | Yes | Identifier of the Flight. |
LIMIT | BIGINT | No | Maximum number of versions to return. |
OFFSET | BIGINT | No | 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 |
|---|---|---|
flight_version | INTEGER | Version number, newest first. |
source_code | VARCHAR | Python source for this version. |
requirements_txt | VARCHAR | requirements.txt contents for this version. |
access_token_name | VARCHAR | Access token label for this version. |
flight_secret_names | LIST(VARCHAR) | Secret names list for this version. |
config | MAP(VARCHAR, VARCHAR) | Config map for this version. |
created_at | TIMESTAMP WITH TIME ZONE | When this version was created. |
Examples
Get the full version history:
SELECT flight_version, source_code, requirements_txt
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>');
Just the latest version:
SELECT flight_version, source_code
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>', "LIMIT" := 1);
Skip the latest, get the rest:
SELECT flight_version, source_code
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>', "OFFSET" := 1);
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.