Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get start and end dates por all Sprints in a project in Jira Cloud?

Paula Remez September 30, 2020

Hi! I Need to get start and end dates por all Sprints in a project in Jira Cloud. I know I can get them in the bakclog, for each sprint, but I need to be able to get them all at once for an extrernal report...  I don't need to be able to export to excel. It is ok to get them all at once to be able to copy and paste... 

Any help will be apreciated!

 

Thanks a lot!

 

Paula

1 answer

1 accepted

2 votes
Answer accepted
Warren
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.
September 30, 2020

Hi @Paula Remez 

Paste the following into the browser that you use for Jira and ensure that you're logged in to Jira

https://CompanyName.atlassian.net/rest/agile/1.0/board/xx/sprint

Replace CompanyName with your company name and xx with the board number of your project. This will return a JSON structure listing all sprints with their start and end dates, plus their state (open, closed).

Paula Remez September 30, 2020

Great! Thanks a lot!!!

Roxanne Mae Sumaya
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!
August 11, 2022

Hi @Warren - Thank you. It works. Is there also a way to get all Sprints? Upon checking it only shows the first 50 Sprints. Thanks in advance!

Derek Lee
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 12, 2022

@Roxanne Mae Sumaya You will need to write some code to account for the pagination in the API:

Below is an example, I'm not sure if it will work for exactly your case since I have not tested if the boards API accepts a startAt and maxResults parameter

start_at = 0 
sub_url = "https://CompanyName.atlassian.net/rest/agile/1.0/board/xx/sprint"

# the following url works for the example:
# sub_url = "https://CompanyName.atlassian.net/rest/api/2/search"

# Create a request object with above parameters. response = requests.request( "GET", url, headers=headers, auth=auth, params=query )

auth = HTTPBasicAuth{<username>, <password>}

headers = { "Accept": "application/json" }

query = {<any JQL parameters needed>}

all_issues = []

while(start_at < response.json()["total"]):
    print("starting at: ", start_at)
    result = requests.request(
    "GET",
    f"{sub_url}?startAt={start_at}&maxResults=1000",
    headers=headers,
    auth=auth,
    params=query
    )
    issues_received = result.json()["maxResults"]
    start_at += issues_received
    print("new start_at: ", start_at)

    tmp = result.json()["issues"]

    all_issues += tmp

Suggest an answer

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

Atlassian Community Events