Forums

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

Jira API: How to filter specific values from changelog histories field

knarasinghe
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!
June 13, 2023

Hi,

When I use the following URL 

https://<company>.atlassian.net/rest/api/3/search?jql=key=<keyname>&expand=changelog

& expand the change logs histories it contains all the change histories and I want to filter specific values (eg: status, labels) from the changelog.histories.items.field

Is there a way to do it from the URL level?

Thanks, 

1 answer

1 vote
Charlie Misonne
Community Champion
June 13, 2023

I'm afraid you can't.

Even the dedicated encpoint for changelogs does not support it: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-changelog-list-post

So you will have to get all the change logs and filter yourself afterwards if you can. If it's a shell script you could use JQ to parse the json response and keep the elements you really need.
Each language will have its way to do it of course.

knarasinghe
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!
June 15, 2023

Thanks for the response 

Suggest an answer

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

Atlassian Community Events