YashGarg
(Yash Garg)
April 1, 2024, 7:35am
1
I am trying to get views names and ids for a board. I am trying this query for the same
{
boards(ids: [1841601504]) {
name
views {
id
name
}
}
}
In response I am getting this
{
"data": {
"boards": [
{
"name": "New Board",
"views": []
}
]
}
}
How can I get the views info ? I am trying this from API playground for now.
dvdsmpsn
(David @ David Simpson Apps)
April 1, 2024, 7:47am
2
Hi @YashGarg
That seems to be the correct way. You won’t see the main table, but should see all the other views.
Here’s a similar query with some results that I see:
I’m trying to find all the board views for my app from within my app.
For example, if multiple board views have been added for the same app, I want my app to be aware.
For a particular board, I can find all the board views using this GraphQL:
{
boards(ids: [2768573330]) {
name
id
type
views {
id
name
type
__typename
settings_str
source_view_id
view_specific_data_str
}
}
}
It produces:
{
"data": {
"boards": [
{
…
YashGarg
(Yash Garg)
April 1, 2024, 8:03am
3
Yes I actually saw your post as well today, and saw that you are getting results but I am not. Don’t know what I am doing wrong. Are you running it from api playground or code ?
YashGarg
(Yash Garg)
April 1, 2024, 8:04am
4
Wait, just realized it is only giving table type views. If I had 3 extra views like chart, kanban and table view. It only returns a table view. That’s why I was not getting views earlier, as earlier I only had chart and kanban apart from main table. Now the question is - is there a way to get all the views not just table views ?
dvdsmpsn
(David @ David Simpson Apps)
April 1, 2024, 8:32am
5
OK, I’ve had another look and it seems that the query is fine for non-native (type = FeatureBoardView
, app) views, but a bit weird for native views.
No results for Kanban, File Gallery or Dashboard
A result for a form (type= FormBoardView
)
YashGarg
(Yash Garg)
April 1, 2024, 8:42am
6
In such a case event this documentation is misleading as it shows one of the return values as a kanban view.
1 Like
dvdsmpsn
(David @ David Simpson Apps)
April 1, 2024, 11:02am
7
For this board:
I’m seeing the following…
Query:
query {
boards(ids: ["****"]) {
name
views {
id
name
type
}
}
}
Result:
{
"data": {
"boards": [
{
"name": "Embedded Board",
"views": [
{
"id": "117212181",
"name": "Embedded Confluence Page",
"type": "FeatureBoardView"
},
{
"id": "118973150",
"name": "Broadcast",
"type": "SppBoardView"
},
{
"id": "138460232",
"name": "Form",
"type": "FormBoardView"
}
]
}
]
},
...
}
So, out of 6 views, only 3 are returned.
1 Like
YashGarg
(Yash Garg)
April 1, 2024, 11:04am
8
@Matias.Monday can you please look into this ?
Hello there @YashGarg ,
Would you be able to please fill this form so our team can take a look into this? Please add as much detail about your case as possible.
Looking forward to hearing from you via the form!
Cheers,
Matias