How to access Sprint details using Api

RambanamP
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.
June 29, 2014

Hi,

is there any api to get Sprint details with board name ??

our requirement is, users will enter board name/s on subtasks and we need get board names from all the subtasks under the issue and need to display the active sprint details from each board on parent issue viewscreen!

Thanks,

4 answers

1 accepted

4 votes
Answer accepted
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2014

Hi Rambanam,

Thank you for your question.

First you need to get the rapidview ID for that sprint, here are the steps:

  1. Run /rest/greenhopper/1.0/rapidview to get list of rapid views with the IDs.
  2. After you get the rapid view ID, you will need to get list of sprints in that rapid view by running/rest/greenhopper/1.0/sprints/{rapidViewId}
  3. After obtaining the Sprint ID, you can run /rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId={rapidViewId}&sprintId={sprintID}to get list of issues for that sprint.

Here is the add-on (JIRA Agile) to the REST API requests to work:

https://marketplace.atlassian.com/plugins/com.pyxis.greenhopper.jira

The information above mentioned has been extracted from https://answers.atlassian.com/questions/133844/greenhopper-rest-api-listing-all-issues-in-a-sprint

Kind regards,
Rafael

RambanamP
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.
June 30, 2014

Thanks for your answer!! i am aware about agile rest api but i am looking for core api of jira agile

i have to get sprint details from scrum boad name!

Simran Kaur
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 15, 2017

I am not able to list the sprints using:

 

/rest/greenhopper/1.0/sprints/{rapidViewId}

 

I get: 

 

<status><script>(function(){(function r() { function e(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = document.createEvent("CustomEvent"); n.initCustomEvent(e + "-gr", !0, !0, t), document.dispatchEvent(n); } function t(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 10; if (e) { for (;e && e !== document.body && !t(e) && n > 0; ) e = e.parentElement, n--; return e && t(e); } } function n(e) { return t(e, function(e) { return e.classList && (e.classList.contains("inline-edit-fields") || e.classList.contains("editable-field")); }); } function r(e) { return "function" == typeof e.matches && e.matches("grammarly-card, grammarly-card *,.gr-top-zero, .gr-top-zero *,[class*=-gButtonPopup], [class*=-gButtonPopup] *,[class*=-onboardingDialog], [class*=-onboardingDialog] *"); } function o(e, t) { var n = t && t.getAttribute("data-action"); "editor" !== n && "login" !== n && e.focus(); } function i(e) { var t = e.target, i = e.relatedTarget || e.explicitOriginalTarget || document.elementFromPoint(a, s); i && t && n(t) && r(i) && (e.stopImmediatePropagation(), o(t, i)); } var a = 0, s = 0; document.addEventListener("blur", i, !0), document.addEventListener("DOMContentLoaded", function() { function t() { return "jira" === document.body.id && document.body.getAttribute("data-version") || document.querySelector("input[type=hidden][title=JiraVersion]"); } t() ? (e("jira-inline-support", { activated: !0 }), document.addEventListener("mousemove", function(e) { a = e.clientX, s = e.clientY; }, !0)) : (e("jira-inline-support", { activated: !1 }), document.removeEventListener("blur", i, !0)); }); })() })()</script><status-code>404</status-code><message>null for uri: https://stalkbuylove.atlassian.net/rest/greenhopper/1.0/sprints</message></status>

 

What is wrong?

Ram Muthiah April 4, 2019

Rafael: Thanks. I am using  https://domain.atlassian.net/rest/greenhopper/1.0/rapid/charts/velocity.json?rapidViewId=<boardId) to get the JSON data for all sprints in the given board. Is there any limit on how many sprints are returned in the response? I don't see any sprints that were active before 1/1/2019. 

Like Justin Cletus likes this
12 votes
greg besson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 28, 2014

The REST signatures have evolved a bit. Let's "fix" Rafael's statement :

First you need to get the rapidview ID for that sprint, here are the steps:

  1. Run /rest/greenhopper/latest/rapidviews/list to get the list of rapid views with the IDs.
  2. After you get the rapid view ID, you will need to get list of sprints in that rapid view by running /rest/greenhopper/latest/sprintquery/{rapidViewId}?includeHistoricSprints=true&includeFutureSprints=true
  3. After obtaining the Sprint ID, you can run /rest/greenhopper/latest/rapid/charts/sprintreport?rapidViewId={rapidViewId}&sprintId={sprintID} to get list of issues for that sprint.

Additionally, you can get the detail of a rapidview : /rest/greenhopper/latest/xboard/work/allData/?rapidViewId={rapidViewId}

Edwin Fuquen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 17, 2015

Is there any official documentation on this anywhere? The official rest api docs are here: https://docs.atlassian.com/jira/REST/latest/#api/2 but make zero mention of these greenhopper endpoints. It also seems like greenhopper has been renamed as simply JIRA - Agile, and again I can't find any documentation about api endpoints for it. Seems less than ideal that I have to find info on this on these boards.

colbywhite
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 28, 2015

What he said. I've been using that link has my 'official' doc and it says nothing about sprints. Is that not the official doc?

Jon Lind
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 2, 2015

Official documentation is here: https://docs.atlassian.com/greenhopper/REST/cloud/

Like Thomas Santonja likes this
2 votes
Bhaskara Yandava July 30, 2018

if you are using version above Jira 7.0 use https://<<jiradomain>>/rest/agile/1.0/sprint/{sprintid} to list sprint details.

https://<<jiradomain>>/rest/agile/1.0/sprint/{sprintid}/issue to list all issues in the sprint.

1 vote
Michael Iles
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 26, 2014

This doesn't work for me (using OnDemand).

I can see rapid views at https://filetrek.atlassian.net/rest/greenhopper/1.0/rapidview but using one of the IDs I get a 404 for https://filetrek.atlassian.net/rest/greenhopper/1.0/sprints/28.

I'm trying to rename a sprint.

Mike

srikanteswararao talluri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 7, 2014

I am also facing the same issue.

Gil Groman
Contributor
November 24, 2015

I get same answer of 404

hkdollar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2016

I think API changed. try "rest/greenhopper/1.0/sprintquery/[rapidviewID]".

Sanjay Mittal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 18, 2016

Thank you Daehee Kim - "sprintquery" resolved the issue that I was facing

Suggest an answer

Log in or Sign up to answer