Adding Issues to Sprint without knowing the SprintID using REST API

Zach Heisler January 23, 2020

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