Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get list API

Get the columns and rows of one Drivetrain list by its list ID, using a GET request.

Use this API to read the contents of one list: its names, its columns in order, and one object per row. To replace a list's rows, use Upload list CSV API.

Method

GET

URL

https://{your_subdomain}.drivetrain.ai/drive/api/v1/public/lists/{listId}

Headers

apikey (required). See Authentication and API keys.

Role

The key's user must have the Admin role and access to the list.

Parameters

Name
In
Type
Required
Description

listId

path

integer

Yes

The list's numeric ID.

To find a list ID, open the list in Drivetrain. The ID is the number at the end of the URL. For https://acme.drivetrain.ai/lists/5410000, the list ID is 5410000.

Each version keeps its own copy of a list, with its own ID. The API returns the stored rows of the copy that the ID belongs to, but calculates formula columns from your live model's lists. Only base-case rows are returned: rows changed or added in a scenario aren't included.

Example request

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

Example response

{
  "id": 5410000,
  "name": "Region",
  "displayName": "Region",
  "columns": ["Region", "Country", "Manager", "Headcount"],
  "rows": [
    { "Region": "EMEA",  "Country": "UK", "Manager": "Alice", "Headcount": "42" },
    { "Region": "NAMER", "Country": "US", "Manager": "Bob",   "Headcount": "118" },
    { "Region": "APAC",  "Country": "IN" }
  ]
}

Response fields

Field
Type
Description

id

integer

The list ID you requested.

name

string

Backend name of the list.

displayName

string

Name shown in the Drivetrain UI. When none is set, name with underscores replaced by spaces.

columns

array of strings

Column names, in the list's column order.

rows

array of objects

One object per row you're allowed to see, in the list's row order. Keys are column names.

Every cell value is a string, including numbers, dates and formula results. Formula results that are very large or very small numbers can use exponent notation, such as 1.23456785E7. A cell with no value can be missing from the row object entirely, as in the APAC row above, so treat a missing key or null as empty.

Errors

Status

When

message

400 Bad Request

listId isn't a whole number

Invalid value for parameter 'listId'

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, or doesn't have access to the list

You don't seem to have permission

404 Not Found

No active list has that ID

Lists with id <listId> not found

A list with no rows returns 200 OK with the full columns array and "rows": [].

Last updated

Was this helpful?