hi
I need to create a Sprint in my Sprint board using the Green hopper REST Apis. I am able to create new Sprints using the following :
curl -u <user>:<pass> -X POST -k -H "Content-Type: application/json" -d "{\"name\" : \"foobar\"}"
https://<jira-host-name>/rest/greenhopper/1.0/sprint/1429
*1429 is the rapid board id.
The problem is the Sprint name. I see the new Sprints are created by names as "Sprint-1, Sprint-2...and so on".
How can I create a Sprint with a custom name. (foobar - in this example)
Please help.
Community moderators have prevented the ability to post new answers.
Hello R S,
Thank you for your question.
Please, refer to https://jira.atlassian.com/plugins/servlet/restbrowser#/resource/greenhopper-1-0-sprint-sprintid for further information. (Note: disable "Show only public APIs")
# [USERNAME], i.e.: myuser # [JIRA-BASE-URL], i.e.: http://my.company.domain # [SPRINT-ID], i.e.: 8 curl -u [USERNAME] -p -H "Content-Type: application/json" -X PUT -d '{"name":"foobar","startDate":"17/Apr/15 10:20 AM","endDate":"18/Apr/15 12:00 PM"}' [JIRA-BASE-URL]/rest/greenhopper/1.0/sprint/[SPRINT-ID]
In case you are running JIRA under HTTPS protocol, please run the cURL command as per following:
curl -D- -u [USERNAME] ...
In the above call, you will be prompted to type in the password to the [USERNAME] given, in this case the password for user "myuser". Alternatively, you could call as per following avoiding to be prompted for password:
curl -u [USERNAME]:[PASSWORD] -H "Content-Type: application/json" ...
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
Please confirm if my understanding is correct. In order to create a new Sprint, i need to follow two steps : 1. Use the api ( as in my original question) to create a new sprint. I will get the newly created sprint's Id as part of the response. 2. Use the api as suggested by you to update this sprint with name, dates etc with the sprint id obtained from step 1. We need to make two calls to create a Sprint with custom name and details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.