Query all boards within a specific Workspace

Hi, Is it possible select a specific workspace?, example query that select all boards of all workspace and I only want a workspace specifly.
query{
boards(limit:1000, newest_first:true){
name,
id,
groups{
title
}
}
}

Thanks

Hey @Cesar
You can use ids to filter results to your preferred boards.

query {
    boards (ids: 157244624 157244624) {
        name
    }
}

https://monday.com/developers/v2#queries-section-boards

Hi @Cesar :wave:

There’s not currently a way to query all boards within a specific workspace via the API. Nor is there currently a way to see which workspace a specific board lives in via the API.

With that said, I can absolutely see how that would be a valuable addition to the API. I’ve gone ahead and passed your feedback along to the team here for review and consideration as we continue to make improvements to the platform and, more specifically to our API :slight_smile:

-Scott

3 Likes

Hi @Scott-monday.com,
Any update on this? would be really helpful for our use of the api.
Thanks

1 Like

Hey @orengb :wave:

A very warm welcome to the community from the Monday.com team :slight_smile: I appreciate you looking this topic up over creating a new thread - awesome way to start your journey with us. I hope you enjoy your stay.

I’ll double-check this with the team and get back to you with a definitive answer as soon as I can :slight_smile: Thanks for taking the time to find out more about the API.

-Alex

@orengb

Thank you for your patience!

So I’ve discussed this in further detail with the team and they’ve confirmed that currently, it is not possible to query boards within a specific workspace just yet. That said, you can query all boards within your account, fetch the workspace ID that they are placed in, and then filter those out in your application’s code:

Do you think that could work in the meantime as we make further improvements?

-Alex

2 Likes

A very cool addition to have! Thanks

2 Likes

Is there any update on this? I seen there in documentation but…I not able to get it

I am doing this way :

query {
boards (workspace_id :1405052) {
name
}
}

1 Like

This feature will be valuable… Its been 2 years without an answer.

This is very useful, as my organisation are creating boards and workspaces as they want, but they follow a template for naming inside a board.

But now I have no way to use the API to list all workspaces, and all the boards inside each workspace. Please expand the API to help me find workspaces.

Is there any chance you could provide a code example of how to do this. Being able to query all the boards on a given workspace would be very valuable! Thank you.

This would be a great feature to have. In my application/integration that is written in C#, I have to query for a list of all boards and then split those out by workspace from all the results. This results in large or multiple queries (even to be able to do async task queries I need to first do a very basic board query to get the total number to be able to split the pagination queries) when it could be simplified if I could specify one or more workspaces only to retrieve. Another feature related to this would be a simple query to get the total number of boards without getting all of the results.

Hello all!

This is not possible yet.

Having said that, I will add your votes to this feature request :slightly_smiling_face:

Cheers,
Matias

1 Like

Can you look at the response below from @AlexSavchuk and provide a code example please in GraphQL.

So I’ve discussed this in further detail with the team and they’ve confirmed that currently, it is not possible to query boards within a specific workspace just yet. That said, you can query all boards within your account, fetch the workspace ID that they are placed in, and then filter those out in your application’s code:

Board.workspace
Board.workspace_id

What would this query look like?

Hello @URounder!

It could look like this:

{
  boards(limit: 100) {
    workspace{
      name
      id
    }
    name
    id
  }
}

2 Likes

query {
boards(workspace_ids: 2516817) {
name
id
}
}

‘workspace_ids’ should be there not ‘workspace_id’.

Querying boards by workspace was released! The boards query has a workspaces argument which filters the result to a specific workspace.

Check out the docs here - Boards

One note: you currently can’t query which boards are in the main workspace, as the ID is null.

1 Like