We were perfectly happy with the existing search endpoint, and yet Atlassian decided to force everyone onto the new search endpoint /rest/api/3/search/jql
. The result? A complete mess:
Pagination is broken. isLast
never returns true, nextPageToken
chains endlessly, delivering thousands of new and unique tokens, but always loading the first page again and again. Integrations are left in infinite loops.
Performance is abysmal. Even for a few thousand issues, requests slowly crawl page after page, wasting time and resources. Nobody can run production pipelines like this.
Stability is gone. Scripts that worked reliably for years with /search
are now brittle, complex, and full of hacks just to load basic data.
Documentation is misleading at best, outright wrong at worst. Developers are left guessing, testing, wasting hours on trial and error.
The bug is known, but why did they close the issue without resolving it? https://jira.atlassian.com/browse/JRACLOUD-94632
Solution:
We did not transition to the new token-pagination endpoints like suggested in Atlassian's email. We now reimplemented the complete interface, using existing Jira Agile API
/rest/agile/1.0/board/{BOARD_ID}/issue
Pagination is working here as expected.
I can't figure out pagination with nextpagetoken and now I'm spending hours exporting data just to keep our reports running. I'm not sure if it's me and I just don't know how to query for a status that doesn't exist, or if it is impossible. Adding my comment in hopes someone can offer more insight.
I tried the pagination as they suggested, using the nextpagetoken. I got token expired errors. The only page I could bring up is the first page. This has broken our reports. For Issues on our Story board, I was able to use the
/rest/agile/1.0/board/{BOARD_ID}/issue
endpoint. However, when I tried to use it on our Kanban board, I can only retrieve those tickets that are currently on the board and not yet closed. This is preventing us from seeing any historical tickets. Atlassian needs to provide a solution soon. Deprecating and endpoint without a viable solution is irresponsible and costly to those depending on it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@amy russell , aside from the missing tickets on your Kanban board, did you encounter any duplicate values if pulling data from multiple boards?
I have roughly 20 boards I need to query and some of the issues are present on multiple boards, due to them being cross-project issues.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had no problem pulling issues from our regular story board querying the issues in this way. There were no duplicates. Pagination works fine for this endpoint:
/rest/agile/1.0/board/{BOARD_ID}/issue
It is only the new endpoint new /rest/api/3/search/jql that is broken for pagination.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
import json
import requests
from requests.auth import HTTPBasicAuth
JIRA_URL = "https://your-domain.atlassian.net"
JIRA_EMAIL = ""
JIRA_API_TOKEN = ""
JIRA_API3_SEARCH_ENDPOINT = f"{JIRA_URL}/rest/api/3/search/jql"
auth = HTTPBasicAuth(JIRA_EMAIL, JIRA_API_TOKEN)
HEADERS = { "Accept": "application/json", "Content-Type": "application/json" }
def fetch_issues(updated="2023-01-01 10:00", maxResults=100, nextPageToken=None)
payload = {
"jql": f'updated >= "{updated}" ORDER BY updated ASC',
"maxResults": maxResults,
"fields": ["*all"]
}
if nextPageToken:
payload["nextPageToken"] = nextPageToken
response = requests.post(
JIRA_API3_SEARCH_ENDPOINT,
headers=HEADERS,
data=json.dumps(payload),
auth=auth
)
response.raise_for_status()
data = response.json()
token = data.get("nextPageToken")
if token:
fetch_issues(updated = updated, maxResults = maxResults, nextPageToken=token)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alexandr, does your code work, or are you having the same issue as the rest of us with nextPageToken not working properly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works for me. Have had no issue there and data is coming in as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Our workaround was to set maxResults to 5000 in the request body and get all results in a single call. Not a perfect workaround by any means and probably wouldn't work in every case, but I'd rather limited results than an infinite loop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for posting this. Do you know if pagination is broken here also? I have about 15k total issues (comprised of all issue types), with my tasks results being nearly 7k issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry @Jordan Murphy we realized that our maxResults workaround....didn't actually work 😐.
We ended up using the Atlassian-recommended workaround in the bug report linked in @p0cket0m 's original post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Melissa Nielsen . That's great customer service from them - we broke the good one, use the one that's 2x the work. 🤔
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is breaking a pretty important automation for us as well. I cannot believe Atlassian is so consistently bad at APIs. This is completely unacceptable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What the blunder Atlassian has done. All integration is broke. Its going in infinite loop.. They dont have basics of system architecture in place... lol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @p0cket0m
Here in community, most of us are Atlassian users like yourself.
This community is an open public form.
On your concerns, reach out to Atlassian Support or use the feedback option in the application, to provide this feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.