API to retrieve list of all boards

Kranthi Kiran Pulluru March 26, 2020

Hello everyone. 

I am building an addon for Jira, and need an API to retrieve list of all boards in a project. I see an api to get details of a board GET /rest/agile/1.0/board/{boardId}

But I don't see any API to get list of all boards in a project.

 

Thanks,

Kranthi

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 26, 2020
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 26, 2020

If you want to filter boards for a particular project you should use projectKeyOrId query parameters as specified in the link.

Tuncay

Jessica.D.Pennell November 29, 2021

It looks like this endpoint does not exist when using cloud platform, and is no longer supported when using the server API (you are required to use a filter ID, although the filter can be an empty filter, the filter must still exist), see

The Jira Software Cloud REST API

The Jira Cloud platform REST API

Do you have a recommended approach given the available endpoints in the documentation? I know I am just speaking with other members of the community and not atlassian but sometimes we come up with some cool tricks :)

Like ArunRaghavendar.A likes this
Jessica.D.Pennell November 29, 2021

Use case if it helps :

The best advice online for getting a list of all valid sprint values is here,

https://stackoverflow.com/questions/37821683/how-to-get-all-sprints-in-project-using-jira-rest-api

You cannot use the createmeta or editmeta endpoint to look up which sprint values are valid without unlocking the type, which requires administrative permissions. There is no allowedValues list for sprints. When creating an issue, to assign to a sprint, you need the sprint ID and board ID. To retrieve the sprint IDs, you have to know the board ID, and thus, there is a need to look up board IDs.

In other words, without the ability to look up all board IDs available to an account, you are effectively working blind and encouraging developers to hard code values which are not coming from the server and therefore may become invalid or out of date as projects change, for example, if a team recreates a Jira board or the company restructures.

Jessica.D.Pennell November 30, 2021

Just an update, it turns out even though it is not available in the most recent documentation I linked previously, you can indeed hit /rest/agile/1.0/board without using a filter and use getAllBoards() using the server API under API 1.0 as of 2021-11-30. Since this did not make it into the most recent documentation, this is a get endpoint and arguments are startAt and maxResults for pagination, and type (scrum, kanban), name, and projectKeyOrId.

Since this is effectively an "Easter egg", should Atlassian remove this functionality, I was able to verify

  • setting up a generic filter through Jira's frontend pulling up all available boards
  • using getBoardByFilterId with this generic filter

Is a futureproof substitute for getAllBoards

Like Monk likes this
Jessica.D.Pennell November 30, 2021

Since this information was difficult to locate in Atlassian's documentation and may be why people discovered this post through a search engine, I am also providing data contracts for Sprint and Board. Only one of boardId or originBoardId are returned by the API, and they are synonymous.

public class Sprint
{
public int id;
public String name;
public State state;
public int boardId, originBoardId;
public String self;
public Date startDate;
public Date endDate;
public Date completeDate;
public String goal;

public static enum State { FUTURE, ACTIVE, CLOSED }
}

 

public class Board
{
public int id;
public String self;
public String name;
public BoardType type;
public Location location;

public static enum BoardType { SCRUM, KANBAN }
}
public class Location
{
public int projectId;
public String displayName;
public String projectName;
public String projectKey;
public String projectTypeKey;
public String avatarURI;
public String name;
}

Suggest an answer

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

Atlassian Community Events