Skip to content

Column Values Resource

Sanif Himani edited this page Jul 30, 2024 · 2 revisions

Querying the column_values API will return the metadata for the column(s).

Basic Usage

client = Monday::Client.new(token: <AUTH_TOKEN>)

response = client.column.column_values

puts response.success?
puts response.body

By default, this will return the ID, title, and description fields.

The response body from the above:

  "data": {
    "boards": [
      {
        "items": [
          {
            "column_values": [
              {
                "id": "person",
                "title": "Owner",
                "description": null
              },
              {
                "id": "status",
                "title": "Status",
                "description": null
              },
              {
                "id": "keywords",
                "title": "Keywords",
                "description": "This is keywords column"
              },
              {
                "id": "date0",
                "title": "Date",
                "description": null
              }
            ]
          },
          {
            "column_values": [
              {
                "id": "person",
                "title": "Owner",
                "description": null
              },
              {
                "id": "status",
                "title": "Status",
                "description": null
              },
              {
                "id": "date0",
                "title": "Date",
                "description": null
              }
            ]
          }
        ]
      }
    ]
  },
  "account_id": 123
}

Customizing Field to Retrieve

You can customize the fields to retrieve by passing in the board_ids and item_ids options and listing all the fields you need to retrieve as an array.

client = Monday::Client.new(token: <AUTH_TOKEN>)

board_ids = [456]
item_ids = [1234, 5678]
select = %w[id description value]

response = client.column.column_values(board_ids, item_ids, select: select)

puts response.success?
puts response.body

You can find the list of all the available fields for column values API here.

Clone this wiki locally