Rest API limiting changelog.history results to 100 (even if maxResults is larger)

Juan Pedro Silva August 26, 2020

Hi all,

I'm trying to get all history entries for a changelog by means of the Rest API (both through the browser or JIRA's Python library) from JIRA Cloud. Whenever I run a request of the type:

/rest/api/2/issue/{issueKey}?expand=changelog&fields=changelog&maxResults={maxResults}

I get at most 100 results, regardless of the number I pass as maxResults. Through Python I can't even pass maxResults to this query.

Is there anyway to work around this issue? Anyway I can get all history elements from a changelog?

3 answers

1 accepted

0 votes
Answer accepted
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 26, 2020

Hello Juan,

According to information in a previous issue related to the changelog parameter, calling an expand on the changelog using a query string is limited to to the most recent 100 changes.

You'll need to use the full changelog endpoint to retrieve all the results:

/rest/api/3/issue/{issueIdOrKey}/changelog

The default sort order for this endpoint is oldest first. The maxResults parameter defaults to 100 for this endpoint but should be honored on this endpoint. You can also use the startAt parameter to page through the results.

Cheers,
Daniel

Tomislav Nikolic September 20, 2022

Hi, @Daniel Eads 

it's not being honored on my dev instance, though.

Like brettveen likes this
Ali Raza February 9, 2023

How can we use startAt,max results for the changelog in this jql? @Daniel Eads 

{"jql": "parent in ('BTP-5') ","maxResults":100,"startAt": 0,"expand":["changelog"],
0 votes
Juan Pedro Silva August 27, 2020

Thanks @Daniel Eads and @Prince Nyeche
I'll follow your guideline.

0 votes
Prince Nyeche
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.
August 27, 2020

Hi @Juan Pedro Silva 

Using the startAt parameter should get you more results from the changelog endpoint just as @Daniel Eads  mentioned. Therefore the behaviour is expected as the default is 100 unless you specify to loop through the records.

Suggest an answer

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

Atlassian Community Events