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

Add a worklog entry

Adds a new worklog entry to an issue.

POST/api/2/issue/{issueIdOrKey}/worklog
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 will be added to

Query parameters
newEstimatestring

Required when 'new' is selected for adjustEstimate. e.g. "2d"

adjustEstimatestring

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

reduceBystring

Required when 'manual' is selected for adjustEstimate. e.g. "2d"

Request body
application/json

Worklog create 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
201

Returned if add 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 add the worklog.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'http://jira.example.com/rest/api/2/issue/string/worklog' \
  -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?