I'm doing an integration for JIRA using REST API 6.2.6. One thing that I need to do is to get Issue Type Scheme and Workflow Scheme for a project.
Issue Type Scheme
The only thing that I can get right now is a list of issue types using /rest/api/2/project/{projectIdOrKey}
. I can't see any way of getting an ID of Issue Type Scheme. Looking at API there is no any endpoints for issue type schemes, so I guess it's not possible.
Workflow Scheme
/rest/api/2/project/{projectIdOrKey}
doesn't return any information about Workflow Scheme. But there is an endpoint /rest/api/2/workflowscheme/{id}
, so that means that it's possible to get ID somehow... At the end I want to get a list of workflows for a project to check transitions for an issue type.
Is there any way to get the data I want? Maybe there is some hidden not documented API?
Note: I'm using only JIRA REST API.
You can also configure the workflow, fields and screens for the issue type in the project, but it is easier to do this by clicking one of the issue types. One of the issue types (e.g. Bug, Task, Story): Click this to configure the workflow/screen for the issue type in the project.
Latest Jira documentation provides information about the APIs which can be used to fetch details for issuetype scheme and workflow scheme. Below are the APIs which can be used for the same,
Rest URL:GET https://your-domain.atlassian.com/rest/api/2/issuetypescheme/project?projectId={projectId}'
Sample Response:
{
"maxResults": 100,
"startAt": 0,
"total": 3,
"isLast": true,
"values": [
{
"issueTypeScheme": {
"id": "10000",
"name": "Default Issue Type Scheme",
"description": "Default issue type scheme is the list of global issue types. All newly created issue types will automatically be added to this scheme.",
"defaultIssueTypeId": "10003",
"isDefault": true
},
"projectIds": [
"10000",
"10001"
]
}
]
}
REST URl: GET https://your-domain.atlassian.com/rest/api/2/workflowscheme/{id}
Sample Response:
{
"id": 101010,
"name": "Example workflow scheme",
"description": "The description of the example workflow scheme.",
"defaultWorkflow": "jira",
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"draft": false,
"self": "https://your-domain.atlassian.net/rest/api/2/workflowscheme/101010"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With