Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced JIRA search from REST v3 returns 200 code with empty data

Garrett Kaufmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 4, 2025

Hi all,

 

I am migrating our application to leverage the enhanced JIRA search endpoint (/rest/api/3/search/jql). We previously used the now deprecated /rest/api/3/search/ endpoint which gave us responses matching the corresponding results from the same JQL query in the JIRA web search window. We currently receive 200 status from hitting the advanced search endpoint, but we get no data for all queries. Even the most basic queries return an empty issues list. We know these queries are valid since they generate results in the web page search still. Our test setup is that of the JQL advanced search v3 API docs demo, and given the 200 status I know it is not a matter of invalid credentials.

This is the response no matter what the query is- and we verify all queries with a search on the web page:

{ "isLast": true, "issues": [] }

1 answer

0 votes
Vitalii Rybka
Rising Star
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.
September 4, 2025

I think the issue might be with the fields or expand parameters - in the v3 API you often get an empty array if no fields are specified. Try adding something like fields=summary,key (or whichever fields you need), and the response should start returning data.

Garrett Kaufmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 4, 2025

Hey Vitalii,

 

We are already requesting fields. This is the request payload setup for our test:

 

url = f"{JIRA_BASE_URL}/rest/api/3/search/jql"
auth = HTTPBasicAuth(JIRA_USER_EMAIL, JIRA_API_TOKEN)
headers = {
  "Accept": "application/json"
}
query = {
  'jql': jql,
  "maxResults": 50,
  "fields": "id,key,summary,status,description"
}


response = requests.request(
   "GET",
   url,
   headers=headers, 
   params=query,
   auth=auth
)
Like Vitalii Rybka likes this
Vitalii Rybka
Rising Star
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.
September 5, 2025

@Garrett Kaufmann, I would like to clarify. Do you use Forge env or Node.js env?

According to the docs, there are several important notes:

  • If the JQL query expression is too large to be encoded as a query parameter, use the POST version of this resource.
  • Permissions required: Issues are included in the response where the user has:

    • Browse projects project permission for the project containing the issue.

    • If issue-level security is configured, issue-level security permission to view the issue.

  • OAuth 2.0 scopes required:
    • Classic: `read:jira-work`
    • Granular: `read:issue-details:jira, read:audit-log:jira, read:avatar:jira, read:field-configuration:jira, read:issue-meta:jira`
  • Connect app scope required: `READ`
Garrett Kaufmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 5, 2025

We are using the requests library for HTTP in Python 3.10.12. We are using a generic token with no permission restrictions. 

Like Vitalii Rybka likes this
Garrett Kaufmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 5, 2025

Update: tried the same jql query with the same fields for a POST request, got a 200 response but empty issues array this time too.

Like Vitalii Rybka likes this
Vitalii Rybka
Rising Star
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.
September 5, 2025

Sounds pretty weird. I believe you should try a very simple request with only one field. Here is an example from the docs:

# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests

from requests.auth import HTTPBasicAuth

import json

url = "https://your-domain.atlassian.net/rest/api/3/search/jql"

auth = HTTPBasicAuth("email@example.com", "<api_token>")

headers = {

"Accept": "application/json"

}

query = {
'jql': 'project = HSP',
'nextPageToken': '<string>',
'maxResults': '{maxResults}',
'fields': '{fields}',
'expand': '<string>',
'reconcileIssues': '{reconcileIssues}'
}

response = requests.request(
"GET",
url,
headers=headers,
params=query,
auth=auth
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Garrett Kaufmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 5, 2025

@Vitalii Rybka We've tried this already, but for sanity's sake I just tried again to no avail. To confirm, the fields attribute should be

 "fields": ["summary","description"] and not "fields": "summary,description"
Garrett Kaufmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 5, 2025

@Vitalii Rybka I tried with a few different projects, and none return data.

Garrett Kaufmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 5, 2025

We fixed the issue by rotating the token.

Like Vitalii Rybka likes this
Vitalii Rybka
Rising Star
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.
September 6, 2025

Yay! My congrats!

As usual, a side effect change has fixed the issue ;-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events