fgalan
fgalan

Reputation: 12322

JIRA REST API jql expression to search by standard issue types

I'm using the following query in the JIRA REST API to get all the issues of an sprint, by sprint id:

GET /api/latest/search?jql=Sprint=2131

However, that returns all the issues but I'm only interested in standard types but not sub-types as sub-task, sub-bug, etc.

Looking to the "Search" option in the JIRA GUI I have seen the following expression that probably suffices:

issuetype in standardIssueTypes()

However, I'm not sure how to apply that to the jql= parameter in the REST API.

Upvotes: 0

Views: 1889

Answers (2)

rorschach
rorschach

Reputation: 2947

Just like you see.

GET [host]/rest/api/latest/search?jql=issuetype%20in%20standardIssueTypes()

or

POST [host]/rest/api/latest/search

Body:

{
    "jql": "issuetype in standardIssueTypes()"
}

Upvotes: 2

codelab
codelab

Reputation: 416

Simple add issuetype in standardIssueTypes() by using AND condition:

jql=sprint=2131 and issuetype in standardIssueTypes()

Upvotes: 1

Related Questions