How to find all the boards of a project?

Denis Rousselle May 27, 2024

Hello,

I'm trying to find the boards of a project using the rest api (get all boards) , but when I use the following query, I only find one even though the project has two

https://my-domain.atlassian.net/rest/agile/1.0/board?projectKeyOrId=FISCFLEX1

{
"maxResults": 50,
"startAt": 0,
"total": 1,
"isLast": true,
"values": [
{
"id": 2361,
"self": "https://my-domain.atlassian.net/rest/agile/1.0/board/2361",
"name": "FISCFLEX1 | Team Board",
"type": "kanban",
"location": {
"projectId": 10991,
"displayName": "SD | FISC - FlexTeam 1 (FISCFLEX1)",
"projectName": "SD | FISC - FlexTeam 1",
"projectKey": "FISCFLEX1",
"projectTypeKey": "software",
"avatarURI": "https:// my-domain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10507?size=small",
"name": "SD | FISC - FlexTeam 1 (FISCFLEX1)"
}
}
]
}


On the other hand, this query displays both boards correctly:
Fortunately the project key is in the name of the boards

https://my-domain.atlassian.net/rest/agile/1.0/board?name=FISCFLEX1

{
"maxResults": 50,
"startAt": 0,
"total": 2,
"isLast": true,
"values": [
{
"id": 2361,
"self": "https://my-domain.atlassian.net/rest/agile/1.0/board/2361",
"name": "FISCFLEX1 | Team Board",
"type": "kanban",
"location": {
"projectId": 10991,
"displayName": "SD | FISC - FlexTeam 1 (FISCFLEX1)",
"projectName": "SD | FISC - FlexTeam 1",
"projectKey": "FISCFLEX1",
"projectTypeKey": "software",
"avatarURI": "https://my-domain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10507?size=small",
"name": "SD | FISC - FlexTeam 1 (FISCFLEX1)"
}
},
{
"id": 2362,
"self": "https://my-domain.atlassian.net/rest/agile/1.0/board/2362",
"name": "FISCFLEX1 | Development",
"type": "scrum",
"location": {
"projectId": 10991,
"displayName": "SD | FISC - FlexTeam 1 (FISCFLEX1)",
"projectName": "SD | FISC - FlexTeam 1",
"projectKey": "FISCFLEX1",
"projectTypeKey": "software",
"avatarURI": "https://my-domain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10507?size=small",
"name": "SD | FISC - FlexTeam 1 (FISCFLEX1)"
}
}
]
}

Why don't I get the same results when filtering with project key and name?

Thank you

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2024

Hi @Denis Rousselle 

Two possible causes I can think of for this behavior:

The get all boards operation with the projectKeyOrId query searches for the provided project name in the board's saved filter: https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-rest-agile-1-0-board-get

Does the board's saved filter include a reference the project?

Do you (or the user calling the REST API) have permissions to see that filter?

Kind regards,
Bill

Denis Rousselle May 28, 2024

Hi @Bill Sheboy

Yes you are right, one board filter searches on the teams only while the other uses the project key
Is it possible to find all the boards belonging to the same project?
Note: I'm Jira admin

Thanks.

Kind regards


Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2024

You could call get all boards with no projectKeyOrId filter to return all boards and then filter on the matching project id in the results.  For example:

"projectId": 10991

If you have have a lot of boards, repeated calls will be needed with paging to gather the results before filtering.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events