> 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-scenario-list-api.md).

# Get scenario list API

Get every scenario in your Drivetrain workspace and the versions it exists in, using a GET request.

Use this API to list every scenario and find the names you pass to `scenarios` 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/scenarios`                                                                                                                        |
| **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/scenarios' \
  --header 'apikey: {your_apikey}'
```

### Example response

```json
{
  "data": [
    { "name": "Base_Case", "displayName": "Base Case", "versions": ["Budget_2026", "Current"] },
    { "name": "Downside",  "displayName": "Downside",  "versions": ["Current"] },
    { "name": "Upside",    "displayName": "Upside",    "versions": ["Current"] }
  ]
}
```

### Response fields

Each scenario appears once, even when it exists in several versions. Scenarios are sorted by `name`, and only scenarios the key's user can access are returned.

| Field         | Type             | Description                                                                                                                                                                                                                                  |
| ------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | string           | Scenario backend name, for example `Base_Case`.                                                                                                                                                                                              |
| `displayName` | string           | Name shown in the Drivetrain UI.                                                                                                                                                                                                             |
| `versions`    | array of strings | Names of the versions the scenario exists in, sorted alphabetically. `Current` is your live model. Other names match [Get version list API](https://integrations.drivetrain.ai/extending-drivetrain/drivetrain-api/get-version-list-api.md). |

### 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 scenarios returns `200 OK` with `"data": []`.


---

# 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-scenario-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.
