Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding Issues to Sprint without knowing the SprintID using REST API

Zach Heisler
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 23, 2020 edited

I have read multiple similar questions, but somehow not able to find the answer I am looking/hoping for. 

I am using the REST API to create issues using /rest/api/2/issue/bulk endpoint. The only issue I am having is creating the cards while assigning to a Sprint. I am able to do so by providing the Sprint ID in a customfield, but the environment I am creating the issues from, I don't inherently know the Sprint ID, only the Sprint Name. I would like to assign the cards to the Sprint if the sprint exists, or create the sprint if it does not exist. 

Is there an endpoint that I can call to provide me with a list of Sprint and Sprint IDs that exist for a specific project? I'm willing to entertain any work arounds as well. 

 

Its absolutely mind boggling to me that the REST documentation doesn't even mention the word "sprint" once. I know I am not the only one having this issue. 

 

 

 

2 answers

1 accepted

0 votes
Answer accepted
David_Bakkers
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.
March 5, 2020

With Jira Agile v7, you used to be able to do it by posting a request to:

/rest/agile/1.0/sprint/{sprintId}/issue

Not sure if Jira Software still supports that method.

Either way, you need to create the issue first, then assign it to a sprint. You can't assign an issue to sprint without first knowing what the ID of the sprint is, so you need to look them up first.

0 votes
Adrian Stephen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 23, 2020

Hi @Zach Heisler 

You can find REST endpoints related to sprints here:

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events