Learn how to read the button column on a monday board using the platform API
The button column allows you to perform an action (i.e., move an item to a new group) with just the click of a button. You can read the button column via the API, but you currently cannot filter, update, or clear it.
Read a button column
You can query the button column using the column_values object that enables you to return column-specific subfields by sending a fragment in your query. Values for the button column are of the ButtonValue type.
query {
items(
ids: [
1234567890
9876543210
]
) {
column_values {
... on ButtonValue {
color
label
}
}
}
}import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });
const query = `query ($item_ids: [ID!]) { items (ids:$item_ids) { column_values { ... on ButtonValue { color label } } } }`;
const variables = {
item_ids: [1234567890, 9876543210],
};
const response = await mondayApiClient.request(query, variables);Fields
| Field | Description |
|---|---|
color String | The button's HEX color value. |
column Column! | The column the value belongs to. |
id ID! | The button column's unique identifier. |
label String! | The button's label. |
text String | The button's text. |
type ColumnType! | The column's type. |
value JSON | The column's JSON-formatted raw value. |
