Can you query boards per workspace?

Scenario: We have our boards organized into different workspaces. We need to add a new group to every board in one of the workspaces. (Once completed it could be 100+ boards)

Request: Is there a way to query the boards in a particular workspace?

If this is not possible now, could it please be added in the future?

Hey @JustWorkAlready – we have added this to our feature request backlog.

I encourage other users who are seeing this to upvote the feature if it’s useful to you, so we can see how many people would get value out of this addition.

2 Likes

Hello monday.com community!

@dipro, what is the status on this feature implementation? Having this would tremendously help improve performance for many of my projects.

Thank you, and happy coding! :crossed_swords:

Hello, monday.com Community.
API query for Getting Boards in a given workpsace is required.

Hello all!

Matias from the Developer Success team here!

This has been passed as a requested feature because we saw that some of you could benefit from it, but we can not provide an ETA at the moment.

I encourage you all to check our changelog every now and then, to see if there are any updates about this.

Thank you for your feedback which is much appreciated and help us keep adding new useful features for you!

Cheers,
-Matias

Is there a roundabout way of doing this, could you query all boards then filter by workspace id?

Test this out before you use this for anything important but I think this python function should do what you want.

def get_all_boards_in_workspace(workspace_id):
    query = """
    query {
        boards (limit:9999) {
            workspace_id
            id
        }
    }
    """
    data = post_query(query)
    boards = data.get('boards', [])
    filtered_boards = [board['id'] for board in boards if board['workspace_id'] == workspace_id]
    return filtered_boards

post_query is a function that handles the API request:

def post_query(query, variables=None):
    data = {"query": query, "variables": variables}
    response = requests.post(url=API_URL, json=data, headers=HEADERS)

    if response.status_code != 200:
        raise ValueError(f"API returned status code {response.status_code}")

    return response.json().get('data', None)

Hello there @URounder,

As of today, the requested feature has not been added to monday.

I am glad you could find a workaround using Python!

Hopefully this can help other users :slightly_smiling_face:

Thank you!

Cheers,
Matias

You can now filter boards for a specific workspace! The boards query has a workspace_ids argument that is used to filter the results.

Check out the docs here - Boards