0
votes

How to get all the status/transition in Jira API ?

http://example.com/rest/api/2/workflow/ returns

[{"name":"jira","description":"The default JIRA workflow.","steps":5,"default":true}]
No id is present in the output, so not able to get workflow details/components.

http://example.com/jira/rest/api/2/issue/PROJ-1/transitions provides only issue specific transition, I need future transitions too.

Any pointer or suggestion would be appreciated.

1
Transitions are specific for project and issue type. So you want to see all statuses in Jira ?ThePavolC
I want workflow specific statuses.Pradnya Mhatre
I think the only option is http://example.com/jira/rest/api/2/issue/PROJ-1/transitions . As you mentioned, it gives issue specific transitions but those should be all statuses that issue can be in.ThePavolC

1 Answers

0
votes

I can't mark question as duplicated, so here is repost:

You can get all transitions for project with /rest/api/2/project/{projectIdOrKey}/statuses endpoint. Here is response example, look at "statuses" array:

[
    {
        "self": "http://localhost:8090/jira/rest/api/2.0/issueType/3",
        "id": "3",
        "name": "Task",
        "subtask": false,
        "statuses": [
            {
                "self": "http://localhost:8090/jira/rest/api/2.0/status/10000",
                "description": "The issue is currently being worked on.",
                "iconUrl": "http://localhost:8090/jira/images/icons/progress.gif",
                "name": "In Progress",
                "id": "10000"
            },
            {
                "self": "http://localhost:8090/jira/rest/api/2.0/status/5",
                "description": "The issue is closed.",
                "iconUrl": "http://localhost:8090/jira/images/icons/closed.gif",
                "name": "Closed",
                "id": "5"
            }
        ]
    }
]