How to Get Sprint Velocity Data via JIRA REST API?

John Consorti November 12, 2019

Hi,

I am looking for a way to obtain velocity data via JIRA server REST API.  I have been unable to find a way to do this and was hoping someone might have some insight on this?  I am basically looking to pull the data from the velocity report page, but for all past sprints.  When I do a REST call for all issues within a sprint, I am only returned the current data, however this is not what I'm looking for.  Any help or advice would be much appreciated.

Thanks in advance!

2 answers

1 accepted

2 votes
Answer accepted
Thomas Magny-Garcia
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.
November 12, 2019

Hi @John Consorti 

According to https://jira.atlassian.com/browse/JSWSERVER-12877 , the documentation is not full. So :

JIRA Agile REST API Reference does not contain any info about how to query Agile reports e.g. Velocity or Burndown.

However, there are available endpoints to achieve this, e.g.:

  • for Velocity:
    /rest/greenhopper/1.0/rapid/charts/velocity?rapidViewId=<board_ID>

     

Hope it helps !

vjpaddy January 8, 2020

Thanks for this. This works.

Aakash Chauhan August 20, 2020

This only gives data for the last 7 sprints. Any ideas on how to get beyond those sprints ?

Like # people like this
Robert Cronk April 21, 2022

I'd also like to get more than 7 sprints of data.  I have little hope of getting more though since this looks like it's just the data from the web interface and there's no way I know of to get beyond that many in the web interface.  Hopefully I'm wrong.  Or someone could point us to a different way to get velocity beyond what this page gives us without buying an expensive add-on.

Like Viktoras Valiokas likes this
Ashikkumar Patel December 19, 2023

Hi, I am getting this response while calling the API endpoint 

{
    "errorMessages": [],
    "errors": {
        "rapidViewId": "The requested board cannot be viewed because it either does not exist or you do not have permission to view it."
    }
}
0 votes
David Yohler January 19, 2024

Digging around, found the sprintreport variation under greenhopper which allows for the sprintId to be passed.  Couldn't find any documentation, but it allows the sprint to be passed just like in the UI dropdown.

/rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId=<board_ID>&sprintId=<sprint_ID>

The velocity appears to be hardcoded at 7.  Which if 2 week sprints, shows a rolling quarter.  Probably due to data size and UI display why it is locked. 

Suggest an answer

Log in or Sign up to answer