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

# Get dimension list API

Get every dimension in your Drivetrain workspace, with its type and number of values, using a GET request.

Use this API to list every dimension in your workspace and find the names you pass to [Get dimension values API](https://integrations.drivetrain.ai/extending-drivetrain/drivetrain-api/get-dimension-values-api.md) and to `dimensions` 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/dimensions`                                                                                                                       |
| **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/dimensions' \
  --header 'apikey: {your_apikey}'
```

### Example response

```json
{
  "data": [
    { "name": "emp_id",    "displayName": "Employee ID", "type": "STRING", "valueCount": 1284 },
    { "name": "hire_date", "displayName": "Hire Date",   "type": "DATE",   "valueCount": 1825 },
    { "name": "product",   "displayName": "Product",     "type": "STRING", "valueCount": 42 }
  ]
}
```

### Response fields

Dimensions are sorted by `name`. Dimensions come from your live model.

| Field         | Type   | Description                                                                                                                               |
| ------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | string | Backend name of the dimension. Use it exactly as returned in other endpoints.                                                             |
| `displayName` | string | Name shown in the Drivetrain UI.                                                                                                          |
| `type`        | string | Data type of the dimension's values, for example `STRING`, `DATE`, `INT64`, `NUMERIC`, `FLOAT64` or `BOOL`. `STRING` when no type is set. |
| `valueCount`  | number | Number of values the dimension currently has.                                                                                             |

### 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 dimensions 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-dimension-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.
