Forums

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

How can I get a users activity/events via the rest api?

Steven Mason August 5, 2020

I am creating an app which requires updates/activity from a user for up to the last week. For example if a user moved a story into done, left a comment, created a bug, etc.

Something like this api from github: https://developer.github.com/v3/activity/events/

The closest I can find via the api is https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-audit-records/

or the xml activity feed however neither of these are ideal.

Any ideas are greatly appreciated!

2 answers

0 votes
Matt Doar
Community Champion
August 5, 2020

What is the problem with the activity stream xml?

Steven Mason August 6, 2020

Hi Matt,

Thank you for your response.

The activity stream xml may work however I would rather consume a rest api if at all possible.

Some issues I can see with the xml stream are:

  • It is not very well documented and it looks like it will be a pain to consume to get the data I need.
  • It looks like it uses http://activitystrea.ms/spec/1.0/ standard which is very outdated and I feel like Jira could get rid of it at any moment,
  • I'm not sure how far the feed goes back.

Do you know if Atlassian plans to replace this with the rest api in the future? Or if there is a way to contact an Atlassian developer?

Cheers,
Steven.

0 votes
Bill Sheboy
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 5, 2020

Hi @Steven Mason -- Welcome to the Atlassian Community!

Without buying a marketplace add-on for audit functions, the only other ways I know to do this are to create a webhook to push the log events, or to create a bunch of automation rules based upon different triggers.

The webhook method can expose changes which don't normally have viewable logs inside of JIRA, such as project-level changes.

 

Best regards,

Bill

Steven Mason August 6, 2020

Hi Bill,

Thank you for your response!

Unfortunately I believe webhooks are only for connect apps which have to be added to a project, I am going for the oauth app route which can be used by any user and does not require an admin to add the app. (I only require read access for a particular user)

I would also like to avoid storing any information from Jira and using this method would require me to. I also wouldn't have access to activity before the webhook was set up for a user.

Cheers,
Steven.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events