Skip to end of metadata
Go to start of metadata

Applicable:

JIRA 5.0 and later.

 

The REST API allows you to send a JQL query and receive a subset issues.

Query of issues assigned to user 'fred'

In this example, we supply a single URL parameter (jql) which contains the JQL query.

Request
Response

Query of issues assigned to user 'fred' whilst restricting the number of results

In this example, we supply two additional URL parameters (to jql) — startAt and maxResults, which respectively specify the starting issue returned in the JQL results and the number of issues from that starting issue.

Request
Response

Query of issues assigned to user 'fred' with ordered results

In this example, we specify a sort order for the results using an "order by" clause in the JQL query itself.

(info) Ordering JQL results is not conducted via a URL parameter in your REST API call.

Request
Response

Query of issues whilst restricting the result's fields

In this example, we supply an additional URL parameter (to jql) — fields, which lists the JIRA fields returned in the JQL results. Each JIRA field in the list should be comma-separated — e.g. fields=id,key.

(info) Be aware that some extra data is always returned in the JSON response.

Request
Response

Query using POST

If the JQL query is too large to specify in a URL parameter, you should POST your JQL query (in JSON format) to the REST API 'search' resource instead. Any additional URL parameters (to url) described above, should be included in your JSON-formatted JQL query.

Request
Response
  • No labels

2 Comments

  1. Anonymous

    please post examples in java or python way of doing it

  2. Anonymous

    Is there a way to invoke pre defined filters that  would return the issues as returned by the filter jql ?