Reputation: 1163
I have the following data, hoping to insert two worklogs at once into the same issue using the rest url:
curl -u jogbra:jogbra -X POST -k --data @data_holiday.txt -H "Content-Type: application/json" https://jira.myworkplace/jira/rest/api/2/issue/4371/worklog
data_holiday.txt contains:
{
"comment": "Christmas Day",
"started": "2015-12-25T08:50:09.423+0000",
"timeSpent": "8h 0m"
},
{
"comment": "Labor Day",
"started": "2015-09-07T08:50:09.423+0000",
"timeSpent": "8h 0m"
}
It only gets the first holiday (with or without the comma).
End goal is to automate the population of holidays. I don't see a way of making more than one worklog with one request, so should I resort to using a loop to call curl? If I do that, do I need to create one data file for each holiday?
I see from this post that google has solved this batch request issue with a "batch" endpoint. How would I accomplish this in jira?
Upvotes: 2
Views: 1340
Reputation: 918
Sorry, but in JIRA only one worklog per on request: https://docs.atlassian.com/jira/REST/latest/#d2e795
Upvotes: 2