How can you update an issue's workflow status through the REST API

Nathaniel Novod May 1, 2013

Is it possible?

Thanks

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

4 votes
Answer accepted
Teck-En
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2013

Use the POST from the REST API: http://docs.atlassian.com/jira/REST/5.2.11/#id109390

curl -D- -u admin:admin -X POST --data {your-json-data} -H "Content-Type: application/json" http://localhost:8080/jira/rest/api/2/issue/TST-1/transitions?expand=transitions.fields

It should allow you to perform transition of an issue.

Zul NS _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2013

Nathaniel, maybe you could paste an example of your code here?

Nathaniel Novod May 1, 2013

Thanks. I'm a newbie and there's probably something obvious I'm missing but I keep getting "Could not find what you are looking for. Maybe you should raise an issue". Is there a certain way that the issue has to be specified? I've tried the issue name (DAR-14) with and without the project in front of it but still can not get the issue recognized.

Thanks.

Nathaniel Novod May 1, 2013

A simplified version is:

curl -D- -u "user:pwd" -X GET 'http://site.broadinstitute.org:8090/jira/rest/api/2/issue/DAR-1'

Actually this appears to happen with all requests - for instance just looking for a list of dashboards I get the same error. The returned data includes:

<section id="content" role="main">
<div class="content-container">
<div class="content-body aui-panel">
<header><h1>Not Found (404)</h1></header>
<div class="aui-message warning">
<span class="aui-icon icon-warning"></span>
<p class="title">/jira/rest/api/2/dashboard</p>
<p>Could not find what you were looking for. Maybe you should raise an issue.</p>
<p><a href="/secure/MyJiraHome.jspa">JIRA home</a></p>
</div>
</div>
</div>
</section>

Is it looking for /secure/MyJiraHome.jspa (JIRA home)? How/where is that supposed to be setup? Or is that not the problem?

Thanks

2 votes
richie_gee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2013

Hi there,

According to the documentation of the REST API below, this is possible

http://docs.atlassian.com/jira/REST/5.2/#id251679

Hope this helps :) cheers

0 votes
Nathaniel Novod May 2, 2013

Found it - the URI should not include the "/jira" for my site - simply http://site.bi.org:8090/rest/..."

Thanks to all for the info.

TAGS
AUG Leaders

Atlassian Community Events