Learn how to read column values on monday boards using the platform API
Every monday.com board has one or more columns, each holding a particular type of information. These column values make up the board's content, and their inner value structure varies based on their type.
Queries
You can use the column_values query to retrieve column value data via the API.
- Returns an array containing metadata about one or a collection of columns
- Can only be nested within an
itemsquery
query {
items(ids: 1234567890) {
column_values {
column {
title
}
id
type
value
}
}
}Arguments
You can use the following arguments to reduce the number of results returned in your column_values query.
| Argument | Description | Enum Values |
|---|---|---|
capabilities [ColumnCapability!] | The column's capabilities. | CALCULATED |
ids [String!] | The specific columns to return. | |
types [ColumnType!] | The specific type of columns to return. |
Fields
You can use the following fields to specify what information your column_values query will return.
| Field | Description |
|---|---|
column Column! | The column the value belongs to. |
id ID! | The column's unique identifier. |
text String | The text representation of the column's value. Not every column supports the text value. |
type ColumnType! | The column's type. |
value JSON | The column's raw value. |
Implementations
Our schema also contains specific types for each column value, such as ButtonValue and StatusValue. These extend the core ColumnValue type, so you can query column-specific fields instead of parsing the column's raw JSON value.
Take the StatusValue type for example. On top of the 5 core fields, it also exposes the column, id, index, is_done, label, label_style, text, type, update_id, updated_at, and value fields specific to the StatusValue type.
Using fragments to get column-specific fields
You can return subfields for a specific column type using GraphQL fragments, or queries that will only run if a specific type is returned. Fragments can help you selectively return column-specific data that doesn't exist on other columns on the board. Each column type has its own fields that are documented here.
Example
Notice the ...on StatusValue expression, which will return the label and update_id only on status columns.
query {
items (ids: 1234567890) {
column_values {
value
type
... on StatusValue { # will only run for status columns
label
update_id
}
}
}
}