Reputation: 23
is there a working REST curl to get all worklog of every issue there is,
I ve tried POST /rest/api/2/worklog/list , but I dont have a list of worklog ids !!
and I don't wanna go through issues either
Upvotes: 1
Views: 12418
Reputation: 11
IDS=$(echo {1001..2000} | tr ' ' ',') && curl \
-u username:password \
-X POST \
--data '{"ids":['$IDS']}' \
-H "Content-Type: application/json" https://jira.com/rest/api/2/worklog/list
Upvotes: 0
Reputation: 1330
you can try this POST API : /rest/tempo-timesheets/4/worklogs/search
which required few request body params as : {"from":"2018-11-01","to":"2018-11-30","epicKey":["epic-key1"],"projectKey":["project-key1"]}
.
Upvotes: 1
Reputation: 711
If you do not want to go through all the issues, you can get the worklog IDs via Get ids of worklogs modified since REST API. The response body will contain the IDs you can use for /rest/api/2/worklog/list.
Upvotes: 0
Reputation: 1757
You will have to go through issues. The fastest way is to execute a search with JQL query: worklogDate > 0 that will return all the issues that have any worklogs. Then you will have to ask for worklogs of each returned issue. Both resources, search results and worklogs of issue are paginated resources so you will have to iterate to get all the worklogs of all the issues (unless you have a small instance).
Upvotes: 0