Query Board and Filter by groupId

Hello, I am new to the monday.com API and I have a few questions about how to query and filter by groupId.

I have been digging all over the sample code and playing with the samples and I can’t find a query that shows what group each item is assigned to

query {
  boards(ids: [123456789]) {
    items_page {
      items {
        id
        name
      }
    }
  }
}

The goal is to design a workflow to pull a list of all the ItemId’s within a groupId using Node.js on an application hosted on Monday code.

I would like to take this list an iterate through them and perform an action. But can not find in the documentation how to filter the list down to just those in a specific group.

Thanks!

Hi @sensiblerehab,

Welcome to the community!

Would this query work for you? Just be aware that it has a pretty high complexity - that’s why I also queried the before and after when making the call to test it out!

query {
  boards (ids: 1234567890) {
    groups {
      id
      items_page {
        items {
          id
          name
        }
      }
    }
  }
  complexity {
    before
    after
  }
}

Otherwise, could you query by specific group IDs and only return the items in each group?

Best,
Rachel

2 Likes

Thanks for your help, I just needed a specific board which greatly simplified the query and the resources required. I will post the final version that did what I need it to do for anyone else that might have the same issue.

query {
  boards (ids: 1234567890) {
    groups (ids:"group_title") {
      items_page {
        items {
          id
          name
        }
      }
    }
  }
  }