[RELEASED] Monday.com API get subitem parent id

Hey!
I found the subitems board id of subitems of one of my boards.
My goal is now to get the list of subitems and also to get the id of the pulse that the subitem is attached to.

I run this query:

{
boards(limit: 500, ids: [BOARD_ID]) {
name
id
items {
name
group {
title
id
}
id
}
}
}

In most items I get the group id as: "subitems_of_PULSE_ID" which make it really easy to extract the parent id.
In some of them the group id is just "topics" which doesn’t allow me to extract the parent id.

What should I do? What is the best way to get the parent id from a subitem.

Thanks!

Hi @asafnevo!

Ahh yes so this is currently something that our developers are actively looking into improving and fixing.

Sadly, the inconsistent group_id behavior that you’re seeing is indeed expected behavior at this time. As such, I would recommend querying your parent items’ column values, and then matching up the parent items with their relevant Subitems accordingly.

I know many of our users currently utilize their own programs to “match” the subitems with their parent items themselves.

I can definitely understand the need here, so I would be more than happy to forward your feedback to our dev team!

-Helen

Hi @Helen

Thanks for this, do you think you could explain this for a noob?

“would recommend querying your parent items’ column values, and then matching up the parent items with their relevant Subitems accordingly.”

I’m trying to integrate with powerbi using this script

Can import the main board fine, but can’t work out how to get subitems… Thanks very much! Mike

Thanks!

@Mike_callow of course! I’m happy to answer any and all your questions :smiley:.

In this case, I would recommend using the column_values query to find all of the column values for all of your items on a board. This will then return the subitems’ Ids.

You can then use one of these subitem Ids to query the subitem board Id, and then from there, query that subitem board to find the column values for all subitems on that board.

The manual part comes with matching each subitem Id with the parent item you had queried first.

It might help to check out this thread too!

Great, thanks Helen!

1 Like

Hi @Mike_callow and @asafnevo!

Happy to announce we just released a parent_item field when querying your subitems that should help here.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.