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
Have you checked this one? https://docs.atlassian.com/jira-software/REST/7.3.1/?#agile/1.0/board-getAllBoards
- GET /rest/agile/1.0/board
If you want to filter boards for a particular project you should use projectKeyOrId query parameters as specified in the link.
Tuncay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Is a futureproof substitute for getAllBoards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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;
}
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.