It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

REST API to fetch the logged hours for particular project?

Is there any REST API to get logged hours for particular project?

Other wise is there any REST API that will list all the issues in given project?

If I get the issues than  I can use /rest/api/latest/issue/{issueIdorKey}

and I can get the worklog from there I can use timeSpent to for my calculation.

Is there any Alternative approach or API ?

My goal is to fetched the logged hours data for given project.





1 answer

1 accepted

0 votes
Answer accepted
DPK J Community Leader Jan 16, 2020

@amarsha  Welcome to the community!

Now coming to your question,

  • Yes you can fetch issues in particular project using REST API,
  • Now coming to work-log part, you will two fields in each issue,
    • timespent, which denotes total time spent on issue
    • worklog, collection of each worklog on issue,
    • you can use any one as per your need.

Thanks for your answer , I was able to get it.

@DPK J, for field: worklog, there is maxResults for it, for example, there are 50 worklog record, but only maxresult, eg, 20 can be retrived in this way. is there a way to lift maxresult to unlimited or some other detour?

DPK J Community Leader May 13, 2020

I need to check on that.

@DPK J, yes, I did. I tried the python solution which is most voted, but I do not satistified with it since it will collect all worklogs during some period even most of those worklogs are not cared for me, and time-costing is huge also.

I also tried use "issueID/worklog" one by one issue, the con is one API for one issue, it looks not perfect too.

Acutally, for this, I am tortured about 3 days.

In end, let my question gone, after all, the inital questioner have got his/her want, your job is done.

DPK J Community Leader May 19, 2020

@hongjyanGot stuck due to my area becoming red alert zone for Covid-19.


I would say if you have some experience in Java, try building an add-on to do this. I think it would be best solution. I will also try at my end for better solution which doesn't consume lot of time.

@DPK J, thanks a lot!!!

I already got support from my company Jira local support, they grant me the access right to my company JIRA mirro DB after they can not bear my 300 times/minutes access to server :).

thanks again :)

Like DPK J likes this

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you