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?
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
Hi, @Daniel Eads
it's not being honored on my dev instance, though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"],
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.
This thread is about Jira CLOUD. You have Jira DATA CENTER. The two are not the same.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.