How to use the jira rest API to update the issue's sprint

I am usinf jira 6.4.x and have successfully created an app that uses the jira rest API to create issues, and to update various fields.  I am having issues setting the Sprint though.  It is a custom field, and via the rest/api/2/issue/xxx-nnnn/editmeta, the field has this format:


And when I pull the sprint data using a GET, the sprint is defined as:

 "customfield_11004": [
 "com.atlassian.greenhopper.service.sprint.Sprint@20de96ed[rapidViewId=38,state=FUTURE,name=Sprint 19,startDate=<null>,endDate=<null>,completeDate=<null>,sequence=174,id=174]"

  So... trying to do a PUT to set the sprint, and am lost.  I tried the following:

    "customfield_11004": [
        "rapidViewId": 38,
         "state": "ACTIVE",
         "name": "Sprint 18",
         "completeDate": null,
         "sequence": 173,

But that give me an error:

 "errorMessages": [
 "Field with id' customfield_11004' and name 'Sprint' does not support operation 'id' Supported operation(s) are: 'set'"
 "errors": {}

  I tried a "set using the following:

  "customfield_11004": [
    {"set" : {"rapidViewId": 38}},
     {"set" : {"state": "ACTIVE"}},
     {"set" : {"name": "Sprint 18"}},
     {"set" : {"completeDate": null}},
     {"set" : {"sequence": 173}},
     {"set" : {"id": 173}}]

but I get an internal server error

 "errorMessages": [
 "Internal server error"
 "errors": {}

  What I really want to do is set just the id that is 173 in the example above..   Any ideas?  TIA  

1 answer

0 votes
Steven Behnke Community Champion Aug 15, 2017

Instead of using the "update custom field" API, you should instead use the JIRA Software API which allows you to add issues to a sprint via Sprint ID:



Thanks for replying.  I appreciate it.

I tried your suggestion... did not work.

I am using PostMan plugin to Chrome... anyway, my json is:

{ "issues": ["xxx-nnnn"]}

I needed the quotes on the issue id.

I used rest address (I did a POST):


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<message>null for uri:</message>


I know I have permission to view the sprint, and the sprint is active.  This is crazy :)  It is like the API does not support sprint resource... because if I use address /jira/rest/api/2/yadayada/173/issue, I get the same 404 error.

Steven Behnke Community Champion Aug 16, 2017

Can you provide your jira base url (replace your domain with 'example'), exact input, and exact output from both the endpoints you're trying to use?

Sure... the base_url is:


FYI... for creating issues, I can successfully use:


Anyway, using postman for my testing, input is :

- Content-Type is application/json

- "Authorization" is "Basic"

- POST method

- message body contains just the following:

{"issues": ["TLS-2965"]}

- Postman has some options for data input... like raw, x-www-form-uelencoded, binary, form-data... so I am using raw

url:  base_url/sprint/173/issue

 I cannot post header contents of the response... page flags something as inappropriate.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,294 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you