Locating Subitem Board ID

Hello! Could someone help me figure out how to locate a Subitem Board ID? Thanks in advance!

hi @Amandalindsey

Through the UI you can open a subitem (as if you want to write an update) and your subitem boardId for that specific subitem can be found in the url

xxx.monday.com/boards/123456789/pulses/987654321

Note that this no longer seems to be true. I used to use this method but noticed recently that when opening a subitem (as if to add an update), the board ID shown in the URL is still the parent board ID. I have to use the API to get the subitem board ID.

hi @avp

Good catch. Indeed the URL shown when opening a subitem has been changed recently. The only option I see is to use the API. In the API playground you can enter this one:

query{boards(ids:123456789){columns(ids:"subitems"){settings_str}}}

Where 123456789 is the boardId of the parent. The output will show soemting like:

{\"allowMultipleItems\":true,\"itemTypeName\":\"column.subtasks.title\",\"displayType\":\"BOARD_INLINE\",\"boardIds\":[987654321]}"

Where 987654321 is the boardId of the board holding the subitems.

1 Like

Do all subitems on a given board use the same board Id? Meaning: does each board have a single “counterpart” subitem board. I ask because I am trying to build a workflow around the activity logs but these are specific to a board id (so to get activity logs for the subitems, i have to query the subitems board id rather than the parent).

Hi,

Yes each board has one unique parent board ID and one unique subitem board ID.

Hope this helps

1 Like

That helps very much, thanks!

1 Like

I had hoped I could use the code provided by @basdebruin above in a generic way to get the subitem board id for any given board, however, I have come across a board which does not have a coresponding subitem board it (i.e. the response to the above query came back empty). Does this simply mean that this board has no subitems (and as a result the subitem board only exists is the board has at least one subitem on it)?

Hi,

This is correct once there is a subitem on the board you will then get a subitem board ID.

For anyone reading this, take note that it’s not “subitems” anymore, it is “subtasks”

query{boards(ids:123456789){columns(ids:“subtasks”){settings_str}}}

Hi @basdebruin @JHconsultancy I found a case where I had to query using a subitems2 id instead, i.e.

query{boards(ids:123456789){columns(ids:"subitems2"){settings_str}}}

Any idea what causes this sort of difference or indeed how to cater for the fact that there could presumably be other suffixed ids, short of running multiple queries and trying each in turn?

Thanks in advance for any advice/guidance you can provide.

Some time ago (over a year?) the subitem was a column that could be added / removed as any other column. When that was the case adding / deleting / adding the subitem column would give it an id with a numeric suffix. Nowadays the subitem column can’t be removed anymore and on those boards the id is always “subitems”

About @eonox 's comment: the type is indeed subtasks, the id is still subitems (except for older boards as described above). To be safe you can use this one, which works in all cases:

{
  boards(ids: 123456789) {
    columns(types: [subtasks]) {
      settings_str
    }
  }
}
2 Likes

I see. Knowing that our board was made last year, that may be the reason why the id of my subitems is “subtasks”, I tried “subitems”, but it didn’t work. I’ll try the types argument, hope it will work.

Many thanks @basdebruin!