Hi,
I have created a filter and trying to fetch 1000 plus records. Can you please let me know how to fetch through Jira API.
Regards,Suma
Hi ibm.kustagi@mercedes-benz.com ,
when using the REST API to fetch a large number of records, such as 1000, you may encounter limitations on the number of results returned. The maxResults parameter in your API request can be set to a desired number, but the actual number of results returned may be limited by the API endpoint's constraints to ensure performance and reliability for all users
maxResults
Changing maxResults parameter for Jira Cloud REST API
https://support.atlassian.com/jira/kb/changing-maxresults-parameter-for-jira-cloud-rest-api/
I've you use scripting, e.g. Python you can use a function like:
def fetch_issues(jql, max_results=100): start_at = 0 all_issues = [] while True: url = f"{JIRA_DOMAIN}/rest/api/3/search" headers = { "Accept": "application/json", "Content-Type": "application/json" } params = { "jql": jql, "startAt": start_at, "maxResults": max_results } response = requests.get( url, headers=headers, params=params, auth=HTTPBasicAuth(EMAIL, API_TOKEN) ) if response.status_code != 200: raise Exception(f"Failed to fetch issues: {response.status_code} {response.text}") data = response.json() issues = data.get("issues", []) all_issues.extend(issues) if start_at + max_results >= data["total"]: break start_at += max_results return all_issues
It looks like you're new here. Sign in or register to get started.