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

Get dimension values API

Get every value of one dimension, with its attributes, one page at a time, using a GET request.

Use this API to read the values of one dimension, with the attributes attached to each value, one page at a time.

Method

GET

URL

https://{your_subdomain}.drivetrain.ai/drive/api/v1/public/dimensions/{dimensionName}/values

Headers

apikey (required). See Authentication and API keys.

Role

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

Parameters

Name
In
Type
Required
Default
Description

dimensionName

path

string

Yes

—

Backend name of the dimension, from Get dimension list API. Not case-sensitive.

attributes

query

string

No

All attributes

Comma-separated attribute names to return, for example department,region. Names are case-sensitive. Columns come back in the order you list them.

pageSize

query

integer

No

500

Rows per page, from 1 to 5000.

pageNumber

query

integer

No

1

Page to return, starting at 1.

Example request

curl 'https://{your_subdomain}.drivetrain.ai/drive/api/v1/public/dimensions/emp_id/values?attributes=department,hire_date,is_active&pageSize=2' \
  --header 'apikey: {your_apikey}'

Example response

{
  "dimension": { "name": "emp_id", "displayName": "Employee ID", "type": "STRING" },
  "attributes": [
    { "name": "department", "displayName": "department", "type": "STRING" },
    { "name": "hire_date",  "displayName": "hire_date",  "type": "DATE" },
    { "name": "is_active",  "displayName": "is_active",  "type": "BOOL" }
  ],
  "data": [
    { "emp_id": "E001", "department": "Engineering", "hire_date": "2021-03-15", "is_active": true },
    { "emp_id": "E002", "department": "Sales",       "hire_date": null,         "is_active": false }
  ],
  "pageNumber": 1,
  "pageSize": 2,
  "hasMore": true
}

Response fields

Field
Type
Description

dimension

object

The dimension's name, displayName and type.

attributes

array of objects

The attribute columns returned in each row, in row order. Each has name, displayName (always the same as name) and type. Empty when the dimension has no attributes.

data

array of objects

One object per dimension value (see below).

pageNumber

integer

The page you requested.

pageSize

integer

The page size you requested.

hasMore

boolean

true when another page follows.

Each object in data

Key
Description

The dimension's name (for example emp_id)

The dimension value. Always the first key.

Each attribute name (for example department)

The attribute value. null when the value is missing.

Values are typed by the column's type:

type

JSON value

BOOL

true or false

INT64, FLOAT64

number

NUMERIC, BIGNUMERIC

string, so large financial values keep full precision

Any other type, including DATE and STRING

string

If a stored value can't be read as its type (for example yes in a BOOL column), it comes back as the original string.

Errors

Status

When

message

400 Bad Request

pageSize is below 1 or above 5000

pageSize must be between 1 and 5000

400 Bad Request

pageNumber is below 1

pageNumber must be >= 1

400 Bad Request

pageSize or pageNumber isn't a whole number

Invalid value for parameter 'pageSize' (or 'pageNumber')

400 Bad Request

A name in attributes isn't an attribute of the dimension

Unknown attribute: <name>

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 full access to the dimension (for example, a dimension marked as confidential)

You don't seem to have permission

404 Not Found

No dimension has that name

Dimension not found: <dimensionName>

A dimension with no values returns 200 OK with "data": [] and the full attributes list.

Paging

Rows come back in a stable order, so pages don't skip or repeat values while the dimension isn't changing. Start at pageNumber=1 and keep adding 1 until hasMore is false. Access is all-or-nothing: you get every value of the dimension or a 403, never a partial list.

Last updated

Was this helpful?