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

API Rest - getting the workflow scheme id for a given project

stuart-donaghy August 27, 2014

Hi,

I am coding a custom script to integrate a product we use into our JIRA support platform however where I am coming unstuck is with getting the workflow's themselves into the C# application I am writing via the REST API. What I want to avoid is having to maintain a map file for mapping issue types to workflows. Whilst I understand there will always be a degree of maintainability with regards to the code, and configuration, I wish to avoid, and delegate this to intelligent code, as much as possible. I feel like either there is something missing in the REST API for this functionality or I have missed something. What I would like to get is the workflow scheme for the project, the URLs for the workflows (or all of the transitions directly) and then have this part of the program download new versions as and when they are published.

Stuart

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
stuart-donaghy September 3, 2014

As no one is able to shed any light on this issue other than Jamie Echlin, and the fact that I have now hard coded the initial configuration schema into my code, I am now shutting this down. The code I have written also updates any out of date workflows however I would have also liked to link back to the schema for any changes there. The solution I am using is an xml configuration file which enables me to do the same thing, albeit manually.

1 vote
JamieA
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.
August 27, 2014

It's simple, there is something missing from the REST APIs. They're not yet complete with respect to the SOAP APIs, and they don't have much in the way of project configuration CRUD stuff.

You can write your own rest api endpoint jira plugin. There are other techniques like screen scraping which I believe the JIRA CLI plugin uses when it can't get info from rest or soap.

stuart-donaghy August 27, 2014

Thank you for your response. All I need is the workflow scheme ID which would then spit out what I want:

/rest/api/2/workflowscheme/{id}

This ID is what I am after which then gives me the mapping for the issues and the workflow names. I can then use:

/secure/admin/workflows/ViewWorkflowXml.jspa?workflowMode=live&workflowName=%name%

This gives me the XML files for the workflows themselves. It's the missing link I am really after: the workflow scheme id.

Hany Hassan August 3, 2016

best way to do that just open the workflow schemes screen on JIRA right click on the link of ur scheme and on Delete link right click and select inspect element , you will get the Id 

TAGS
AUG Leaders

Atlassian Community Events