I'm trying to get all of my worklogs with details through the JIRA API and I'm not quite sure if my approach is correct. It seems very counter intuitiv:
So my questions are:
"Do I really need to make two calls and filter them on my own"
Yep
"Do I really have to loop through all pages until I reached the end?"
Yep
Welcome to the tedious world of pulling down Issue worklogs, returned in fixed chronological order :)
Use the startedAfter, startedBefore or since parameters in your queries to restrict the time range of the events to make your result set smaller, but you'll still have to deal with any pagination for large sets.
Have fun.
I actually found a "better" way to do it.
I'm searching for issues with JQL using the search endpoint and this query:
`worklogAuthor = %AUTHOR_ID% AND worklogDate > %DATE%`
With `"fields": ["worklog"]` it is possible to get the worklogs in the same call.
This leads to a loot of looping through paginations in there, but this way I usually have to use less calls and don't run in to issues on larger Jira instances.
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.