Worklog CRUD
Create worklog
Access: JIRA_URL/rest/jttp-rest/4/public/worklog
POST method
Example:
{
"comment": "test",
"date": "21/May/24",
"durationTime": "1h",
"issueKeys": ["SAM-1"],
"onBehalfOfUser": "JIRAUSER10100",
"startTimeValue": "09:00 AM",
"worklogCategories": ["Dev","HR"]
}
When successfull, it will return the list of worklog IDs.
comment | Work description string. | mandatory |
---|---|---|
date | Start date of the worklog. It should be in the format configured in the “Look and Feel” settings in Jira. (jira.lf.date.dmy (Day/Month/Year Format)) | mandatory |
durationTime | Duration of the worklog. Same duration format should be used as in Jira. (Xw Xd Xh Xm) | mandatory |
issueKeys | List of issue keys where the worklog should be created. | mandatory |
onBehalfOfUser | Jira USERKEY of the user on whose behalf you want to create the worklog. | optional |
startTimeValue | Start time of the worklog. It should be in the format configured in the “Look and Feel” settings in Jira. (jira.lf.date.time (Time Format)) | mandatory |
worklogCategories | List of worklog attributes. | depending on the configuration |
Update worklog
Access: JIRA_URL/rest/jttp-rest/4/public/worklog/{worklogId}
PUT method
{
"comment": "test",
"date": "21/May/24",
"durationTime": "1h",
"issueKeys": ["SAM-1"],
"onBehalfOfUser": "",
"startTimeValue": "09:00 AM",
"worklogCategories": ["Dev","HR"]
}
When successfull, it will return the same worklog object as it is for the “Get worklog” request.
comment | Work description string. | mandatory |
---|---|---|
date | Start date of the worklog. It should be in the format configured in the “Look and Feel” settings in Jira. (jira.lf.date.dmy (Day/Month/Year Format)) | mandatory |
durationTime | Duration of the worklog. Same duration format should be used as in Jira. (Xw Xd Xh Xm) | mandatory |
issueKeys | List of issue keys where the worklog should be created. | mandatory |
onBehalfOfUser | Jira USERKEY of the user on whose behalf you want to create the worklog. | optional |
startTimeValue | Start time of the worklog. It should be in the format configured in the “Look and Feel” settings in Jira. (jira.lf.date.time (Time Format)) | mandatory |
worklogCategories | List of worklog attributes. | depending on the configuration |
Get worklog
Access: JIRA_URL/rest/jttp-rest/4/public/worklog/{worklogId}
GET method
When successfull, it will return a worklog object:
{
"dateISOFormat": "2024-05-14T10:00:00Z",
"issueKey": "SAM-1",
"timeSpentInSec": 7200,
"worklogAuthorKey": "JIRAUSER10000",
"worklogCategories": [
"Dev",
"Test"
],
"worklogDescription": "Updated Worklog",
"worklogId": 10200
}
dateISOFormat | Start date of the worklog in ISO format. |
issueKey | The key of the Issue where the worklog is. |
timeSpentInSec | Duration of the worklog in seconds. |
worklogAuthorKey | Jira USERKEY of the worklog author user. |
worklogCategories | List of worklog attributes. |
worklogDescription | Work description string. |
worklogId | The ID of the worklog in Jira. |
Delete worklog
Access: JIRA_URL/rest/jttp-rest/4/public/worklog/{worklogId}
DELETE method
When successfull, it will return status 200.