Board views
monday.com board views allow you to visualize your board data differently. For example, you could see all events on a board in a Calendar View to easily see what's coming up in your schedule or use the Charts View to get reports from your data. The API will provide you with records of all views added to a board.
As a developer working with monday.com, it is important to familiarize yourself with the views
API so you know how to access board view data. This document will walk you through the available queries to read the views
object via the API.
Queries
Querying views
will return a collection of board views from a specific board. This method accepts various arguments and returns an array.
You can only query views
by nesting it within a boards
query, so it can't be used at the root.
query {
boards (ids: 1234567890) {
views {
type
settings_str
view_specific_data_str
name
id
}
}
}
let query = 'query { boards (ids: 1234567890) { views { id name type } } }';
fetch ("https://api.monday.com/v2", {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization' : 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
'query' : query
})
})
.then(res => res.json())
.then(res => console.log(JSON.stringify(res, null, 2)));
This query would return the following:
{
"data": {
"boards": [
{
"views" : [
{
"type": "FormBoardView",
"settings_str": "{\"columns\":{\"name\":{\"visible\":true,\"question\":\"Name\",\"type\":\"name\"},\"email\":{\"visible\":true,\"question\":\"Email\",\"type\":\"email\"},\"phone\":{\"visible\":true,\"question\":\"Phone\",\"type\":\"phone\"},\"location\":{\"visible\":true,\"question\":\"Location\",\"type\":\"location\"},\"text6\":{\"visible\":true,\"question\":\"T-shirt Size\",\"type\":\"text\"},\"pulse__update\":{\"visible\":false,\"question\":\"Update\"},\"status8\":{\"visible\":true,\"question\":\"Status\",\"type\":\"color\"}},\"formTitle\":\"Contact Info and T-shirt Form\",\"show_name_question\":true,\"backgroundColor\":\"chili-blue\",\"headerColor\":null,\"createdBy\":31855020}",
"view_specific_data_str": "{\"token\":\"abcdefg12345678\",\"disabled\":false,\"region\":\"use1\"}",
"name": "Contact Form",
"id": "55567306"
},
{
"type": "ItemsGalleryBoardView",
"settings_str": "{}",
"view_specific_data_str": "{}",
"name": "Cards",
"id": "212647324"
},
{
"type": "KanbanBoardView",
"settings_str": "{\"pivot_by_column\":{\"status8\":true},\"assignee_column\":{},\"gallery_column\":{\"all\":true},\"card_columns\":{\"person\":true,\"date\":true,\"subitems\":true},\"display_mode\":\"crop\",\"divide_by_column\":{\"group\":true},\"createdBy\":31855020}",
"view_specific_data_str": "{}",
"name": "Kanban",
"id": "212644479"
}
]
}
]
}
}
Arguments
You can use the following argument(s) to reduce the number of results returned in your views
query.
Argument | Description |
---|---|
ids [Int] | The specific board IDs to return views for. Please note that this argument's type is [ID!] in API versions 2023-10 and later. |
type String | The specific type of views to return. |
Fields
You can use the following field(s) to specify what information your views
query will return.
Field | Description |
---|---|
id ID! | The view's unique identifier. |
name String! | The view's name. |
settings_str String! | The view's settings. |
type String! | The view's type. |
view_specific_data_str String! | Specific board view data (only supported for forms). |
Join our developer community!
We've created a community specifically for our devs where you can search through previous topics to find solutions, ask new questions, hear about new features and updates, and learn tips and tricks from other devs. Come join in on the fun! 😎
Updated 3 months ago