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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.