Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Update a worklog entry

Updates an existing worklog entry. Note that:

  • Fields possible for editing are: comment, visibility, started, timeSpent and timeSpentSeconds.
  • Either timeSpent or timeSpentSeconds can be set.
  • Fields which are not set will not be updated.
  • For a request to be valid, it has to have at least one field change.
PUT/api/2/issue/{issueIdOrKey}/worklog/{id}
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

or
AuthorizationBearer token · headerrequired

Personal Access Token — Administration > Profile > Personal Access Tokens

AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Path parameters
issueIdOrKeystringrequired

a string containing the issue id or key the worklog belongs to

idstringrequired

id of the worklog to be updated

Query parameters
newEstimatestring

required when 'new' is selected for adjustEstimate

adjustEstimatestring

allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are: new, leave, auto

Request body
application/json

Worklog update request

authorUserJsonBean
Show properties
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
commentstring
createdstring
idstring
issueIdstring
selfstring<uri>
startedstring
timeSpentstring
timeSpentSecondsinteger<int64>
updateAuthorUserJsonBean
Show properties
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
updatedstring
visibilityVisibilityJsonBean
Show properties
typestring
Allowed:grouprole
valuestring
Responses
200

Returned if update was successful.

authorUserJsonBean
Show properties
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
commentstring
createdstring
idstring
issueIdstring
selfstring<uri>
startedstring
timeSpentstring
timeSpentSecondsinteger<int64>
updateAuthorUserJsonBean
Show properties
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
updatedstring
visibilityVisibilityJsonBean
Show properties
typestring
Allowed:grouprole
valuestring
400

Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

403

Returned if the calling user does not have permission to update the worklog.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'http://jira.example.com/rest/api/2/issue/string/worklog/string' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "author": {
    "active": true,
    "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "key": "fred",
    "name": "Fred",
    "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "comment": "I did some work here.",
  "created": "2010-07-14T18:23:23.733+0000",
  "id": "100028",
  "issueId": "10002",
  "self": "http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000",
  "started": "2010-07-14T18:23:23.733+0000",
  "timeSpent": "3h 20m",
  "timeSpentSeconds": 12000,
  "updateAuthor": {
    "active": true,
    "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "key": "fred",
    "name": "Fred",
    "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "updated": "2010-07-14T18:23:23.733+0000",
  "visibility": {
    "type": "group",
    "value": "jira-software-users"
  }
}'
Response
{
  "author": {
    "active": true,
    "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "key": "fred",
    "name": "Fred",
    "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "comment": "I did some work here.",
  "created": "2010-07-14T18:23:23.733+0000",
  "id": "100028",
  "issueId": "10002",
  "self": "http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000",
  "started": "2010-07-14T18:23:23.733+0000",
  "timeSpent": "3h 20m",
  "timeSpentSeconds": 12000,
  "updateAuthor": {
    "active": true,
    "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "key": "fred",
    "name": "Fred",
    "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "updated": "2010-07-14T18:23:23.733+0000",
  "visibility": {
    "type": "group",
    "value": "jira-software-users"
  }
}

Was this page helpful?