Getting a count of all items on a board and using the cursor

Hi, this is a two part question.

Part 1: We have a board that is managed strictly through the API. Long story shot - the product teams use Monday, the engineering teams use Jira, our script connects Jira epics to Monday items and displays their aggregated story points. Problem is we have a lot of engineering teams and the Monday board is at +500 items.

For what I am currently doing I don’t need specific items so I do a bulk retrieval from a group. But I have no idea of how many items are actually on the board, just that its more than 500. I know its more than 500 because we keep logs of uploads and I also run a cleanup script to make sure there are no duplicates or link issues and that script only returns 500 items. Its been returning 500 for 2 weeks now despite the main script adding new items. So is there an API way to return a count of group items?

Part two is I don’t understand the cursor property. I assume its like a startAt and limit combination but I don’t see where I would put those values in. If someone could type slowly and explain it to me I’d appreciate it.

Hello there @KargoTechComms ,

  1. There is no field that gives you the number of items in a group. You need to count that on your end.

  2. You can check how the cursor works and how to implement it here :grin:

Cheers,
Matias

Thanks for the reply. I already figured it out. But it is kind of strange that the API doesn’t return a total results count.

boards have a “items_count” field, which returns a number of the total items on the board.

{
  boards(ids: "123345679890"){
    items_count
  }
}
{
  "data": {
    "boards": [
      {
        "items_count": 5
      }
    ]
  }
}
1 Like