> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/extending-drivetrain/drivetrain-api/get-version-list-api.md).

# Get version list API

Get your live model and every version in your Drivetrain workspace, using a GET request.

Use this API to list your live model and every version, and find the names you pass to `versions` in [Get metrics bulk data API](https://integrations.drivetrain.ai/extending-drivetrain/drivetrain-api/get-metrics-bulk-data-api.md).

|             |                                                                                                                                                                                               |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Method**  | `GET`                                                                                                                                                                                         |
| **URL**     | `https://{your_subdomain}.drivetrain.ai/drive/api/v1/public/versions`                                                                                                                         |
| **Headers** | `apikey` (required). See [Authentication and API keys](https://github.com/DrivetrainAi/gitbook-integrations/tree/main/en/extending-drivetrain/drivetrain-api/authentication-and-api-keys.md). |
| **Role**    | The key's user must have the **Admin** role.                                                                                                                                                  |

This endpoint takes no parameters.

### Example request

```bash
curl 'https://{your_subdomain}.drivetrain.ai/drive/api/v1/public/versions' \
  --header 'apikey: {your_apikey}'
```

### Example response

```json
{
  "data": [
    { "name": "Current",     "displayName": "FY26 Operating Plan" },
    { "name": "Budget_2026", "displayName": "Budget 2026" },
    { "name": "Q1_Forecast", "displayName": "Q1 Forecast" }
  ]
}
```

### Response fields

The first entry is always your live model. The other versions follow in the order they were created, including locked versions.

| Field         | Type   | Description                                                                                                                                 |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | string | Version backend name. `Current` for your live model. For other versions, the version's name with spaces replaced by underscores.            |
| `displayName` | string | For `Current`, your model's name (`Current Plan` if the model has no name). For other versions, `name` with underscores replaced by spaces. |

`Actual` isn't listed, but [Get metrics bulk data API](https://integrations.drivetrain.ai/extending-drivetrain/drivetrain-api/get-metrics-bulk-data-api.md) accepts it and uses it by default.

### Errors

| Status             | When                                                                        |
| ------------------ | --------------------------------------------------------------------------- |
| `401 Unauthorized` | Missing or invalid `apikey`, or API access isn't part of your subscription. |
| `403 Forbidden`    | The key's user doesn't have the **Admin** role.                             |

A workspace with no versions returns `200 OK` with only the `Current` entry.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://integrations.drivetrain.ai/extending-drivetrain/drivetrain-api/get-version-list-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
