How to get all Jira statuses from a workflow of an issue by using rest API (2024)

Tuyen Ho

I'm New Here

How to get all Jira statuses from a workflow of an issue by using rest API (2)

I'm New Here

Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!

Get involved

April 11, 2017

I'm using jira cloud. Now I want to get all statuses from a workflow of an issue by using rest API. I readrest api specification, searched google and this forum but no hope.

There is a postlook as same as my issue. However, the answer is not clear and it seems to be used for jira server version.

Anyone please help! Thanks

Answer

Watch

Like Adel SASSI likes this

20951 views

3 answers

1 accepted

5 votes

Answer accepted

Nic Brough -Adaptavist-

Community Leader

How to get all Jira statuses from a workflow of an issue by using rest API (4)

Community Leader

Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.

Become a leader

April 11, 2017

The short answer to the question is "you can't". There is no REST call for "all JIRA status from a workflow".

You are right about the other post you found - it's about code that you can add to a server install, not about a REST call.

But we can get you close. The rest API has GET /rest/api/2/project/{projectIdOrKey}/statuses which will get you all the status for a project (in which your issue lives)

Generally though, a list of status for a workflow is not really that useful. You can't do a lot with it, other than reporting, and for that sort of reporting, the list of status from the project is usually more useful.

The usual reason for asking for a list of status is for the follow-up - you want to transition the issue to one of them. There is a far better option in the REST interface here - use /rest/api/2/issue/{issueIdOrKey}/transitions - this lists the currently available transitions (and their end point), which saves you having to code to work out what transitions might be valid.

View More Comments

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

  • Comment

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

  • Comment

Like

Reply

6 votes

Matthias Gaiser _K15t_

Community Leader

How to get all Jira statuses from a workflow of an issue by using rest API (7)

Community Leader

Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.

Become a leader

April 12, 2017

There is an inofficial REST API provided by JIRA's project-config plugin you can use:

  • You can retrieve the workflowscheme with this call:
    JIRA_BASE_URL/rest/projectconfig/1/workflowscheme/PROJECT_KEY
  • The workflow can then be retrieved using the workflow name by one of the following endpoints:
    JIRA_BASE_URL/rest/projectconfig/1/workflow?workflowName=WORKFLOW_NAME&projectKey=PROJECT_KEYJIRA_BASE_URL/rest/workflowDesigner/latest/workflows?name=WORKFLOW_NAME&draft=false

These endpoints are right now also available in the JIRA Cloud, but of course there is no guarantee that they remain stable.

View More Comments

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

  • Comment

Matthias Gaiser _K15t_

Community Leader

How to get all Jira statuses from a workflow of an issue by using rest API (9)

Community Leader

Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.

Become a leader

December 5, 2017

btw: unfortunately these endpoints are not available with other authentication methods than basic HTTP authentication.

Please vote or comment here if you want to get these APIs officially.

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

  • Comment

Like

Reply

1 vote

Daniel Eads _unmonitored account_

Rising Star

How to get all Jira statuses from a workflow of an issue by using rest API (11)

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.

Get recognized

April 11, 2017

Hi Tuyen,

You probably saw the API calls for getting all statuses in JIRA and statuses that apply to a particular project. You probably also saw how to get all the available transitions for a particular issue (the results show what statuses the issue could wind up in).

The answer you linked to gives an example of code you might use to retrieve the statuses from a workflow in Java. While they don't explicitly point to these instructions here, they do imply you'd need to develop your own plugin to do it. Unfortunately that's probably something far more involved than you were looking for.

Given the other information available in the API, I agree that this seems like something you might expect to find in the workflow API.One workaround using only the APIs available to you might be to create a project that only has the workflow you're interested in, and then use the project API to retreive the statuses for that project (which will be limited to just that workflow).

View More Comments

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

  • Comment

Tuyen Ho

I'm New Here

How to get all Jira statuses from a workflow of an issue by using rest API (13)

I'm New Here

Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!

Get involved

April 11, 2017

Thanks for supporting me. I will try to build a plugin :D :D

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

  • Comment

Like

Reply

Suggest an answer

Log in or Sign up to answer

How to get all Jira statuses from a workflow of an issue by using rest API (14)

Still have a question?

Get fast answers from people who know.

Sign up for free Log in

Was this helpful?

Thanks!
How to get all Jira statuses from a workflow of an issue by using rest API (2024)
Top Articles
Latest Posts
Article information

Author: Reed Wilderman

Last Updated:

Views: 6548

Rating: 4.1 / 5 (52 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Reed Wilderman

Birthday: 1992-06-14

Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877

Phone: +21813267449721

Job: Technology Engineer

Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti

Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.