Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Is there an API available to fetch information regarding actor when issue get updated?

Edited

Is there an API available to fetch information regarding actor when issue get updated?

We can get creator of issue using 'get issue API' but when issue gets updated we do receive an actor in the response  

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2020

Hi Sneha,

If I understand correctly, you are looking to find out which user made a change to a Jira Cloud issue via the API.  The REST API can do this, but you tend to need to look closely at the history of the issue to determine this.  When using the REST API this requires that you use the expand parameter and then specify changelog.  This will return issue histories in a json format from which you can then look to see which user made which changes to the issue.

While the Get issue endpoint has this documented, I will share with you how I can find this via REST API call using curl.   First I made a change to a particular issue (changed the component on an issue from having a value to having no components at all), then I made the following REST API call:

curl -D- -X GET -H "Authorization: Basic [redacted]" -H "Content-Type: application/json" "https://[mycloudsite].atlassian.net/rest/api/2/issue/SCRUM-64?expand=changelog"

This could return a large json response, especially if there have been lots of changes to an issue, but essential you can look through these to find an entry that has the change you are looking for, and then you should be able to see the user accountId and/or their display name:

"key":"SCRUM-64","changelog":{"startAt":0,"maxResults":2,"total":2,"histories":[{"id":"11257","author":{"self":"https://[mycloudsite].atlassian.net/rest/api/2/user?accountId=[redactedUserAccountId]","accountId":"[redactedUserAccountId]","avatarUrls":{...[redacted because they are not important to this example ...},"displayName":"Charlie","active":true,"timeZone":"America/Chicago","accountType":"atlassian"},"created":"2020-05-19T13:22:15.735-0500","items":[{"field":"Component","fieldtype":"jira","fieldId":"components","from":"10065","fromString":"asdfasdf","to":null,"toString":null}]}

In this response you can see that Charlie change the componet from an internal value of 10065 to null (which means the component has been removed).  You can also see that there is an author value here that identifies that user's accountId, which would be a better means to correctly identify user accounts that make changes rather than just depending on the display name itself.

I hope this helps.  Please let me know if you have any followup concerns here.

Andy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events