You are on page 1of 43

​ About

​ Version
​ Authentication and authorization
​ Permissions
​ Expansion, pagination, and ordering
​ Special headers
​ Anonymous operations
​ Asynchronous operations
​ Experimental features
​ Status codes

Announcement banner
Application roles
Audit records
Avatars
Dashboards
Filters
Filter sharing
Group and user picker
Groups
Instance information
Issues
UI modifications (apps)
Issue attachments
Issue comments
Issue comment properties
Issue fields
Issue field configurations
Issue custom field contexts
Issue custom field options
Issue custom field options (apps)
Issue custom field values (apps)
Issue custom field configuration (apps)
Issue links
Issue link types
Issue navigator settings
Issue notification schemes
Issue priorities
Issue properties
Issue remote links
Issue resolutions
Issue search
Issue security level
Issue security schemes
Issue types
Issue type schemes
Issue type screen schemes
Issue type properties
Issue votes
Issue watchers
Issue worklogs
​ Get issue worklogs
​ Add worklog
​ Get worklog
​ Update worklog
​ Delete worklog
​ Get IDs of deleted worklogs
​ Get worklogs
​ Get IDs of updated worklogs
Issue worklog properties
Jira expressions
Jira settings
JQL
Labels
Myself
Permissions
Permission schemes
Projects
Project avatars
Project categories
Project components
Project email
Project features
Project key and name validation
Project permission schemes
Project properties
Project roles
Project role actors
Project types
Project versions
Screens
Screen tabs
Screen tab fields
Screen schemes
Server info
Status
Tasks
Time tracking
Users
User properties
User search
Webhooks
Workflows
Workflow transition rules
Workflow schemes
Workflow scheme project associations
Workflow scheme drafts
Workflow statuses
Workflow status categories
Workflow transition properties
App properties
Dynamic modules
App migration
Other operations

Rate this page:

Unusable

Poor

Okay

Good

Excellent

Issue worklogs
This resource represents issue worklogs. Use it to:

● get, create, update, and delete worklogs.


● obtain lists of updated or deleted worklogs.

Get issue worklogs

GET /rest/api/3/issue/{issueIdOrKey}/worklog

Returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or
after a date and time.
Time tracking must be enabled in Jira, otherwise this operation returns an error. For more
information, see Configuring time tracking.

This operation can be accessed anonymously.

Permissions required: Workloads are only returned where the user has:

● Browse projects project permission for the project that the issue is in.
● If issue-level security is configured, issue-level security permission to view the issue.
● If the worklog has visibility restrictions, belongs to the group or has the role visibility is
restricted to.

Connect app scope required: READ


OAuth 2.0 scopes required:

ClassicRECOMMENDED:read:jira-work

Granular:read:group:jira, read:issue-worklog:jira, read:issue-worklog.property:jira,


read:project-role:jira, read:user:jira ...(Show more)

Request

PATH PARAMETERS
issueIdOrKey REQUIRED

string

The ID or key of the issue.

QUERY PARAMETERS

startAt

integer
The index of the first item to return in a page of results (page offset).

Default: 0, Format: int64

maxResults

integer

The maximum number of items to return per page.

Default: 5000, Format: int32


startedAfter

integer

The worklog start date and time, as a UNIX timestamp in milliseconds, after which worklogs are
returned.

Format: int64

startedBefore
integer

The worklog start date and time, as a UNIX timestamp in milliseconds, before which worklogs are
returned.

Format: int64

expand

string
Use expand to include additional information about worklogs in the response. This parameter
acceptsproperties, which returns worklog properties.

Default:

Example

Forge

cURL
Node.js

Java

Python

PHP

1
2

6
7

10

11
12

// This sample uses Atlassian Forge

// https://developer.atlassian.com/platform/forge/

import api, { route } from "@forge/api";


const response = await
api.asUser().requestJira(route`/rest/api/3/issue/{issueIdOrKey}/worklog`, {

headers: {

'Accept': 'application/json'

});
console.log(`Response: ${response.status} ${response.statusText}`);

console.log(await response.json());

Responses

200
401

404

Returned if the request is successful

Content type Value


application/json PageOfWorklogs

Example response (application/json)

2
3

7
8

10

11

12
13

14

15

16

17
18

19

20

21

22
23

24

25

26

27
28

29

30

31

32
33

34

35

36

37
38

39

40

41

42
43

44

45

46

47
48

"startAt": 0,

"maxResults": 1,

"total": 1,
"worklogs": [

"self":
"https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",

"author": {
"self":
"https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
,

"accountId": "5b10a2844c20165700ede21g",

"displayName": "Mia Krystof",

"active": false

},
"updateAuthor": {

"self":
"https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
,

"accountId": "5b10a2844c20165700ede21g",

"displayName": "Mia Krystof",

"active": false
},

"comment": {

"type": "doc",

"version": 1,

"content": [
{

"type": "paragraph",

"content": [

"type": "text",
"text": "I did some work here."

]
},

"updated": "2021-01-18T23:45:00.000+0000",

"visibility": {

"type": "group",

"value": "jira-developers",
"identifier": "276f955c-63d7-42c8-9520-92d01dca0625"

},

"started": "2021-01-17T12:34:00.000+0000",

"timeSpent": "3h 20m",

"timeSpentSeconds": 12000,
"id": "100028",

"issueId": "10002"

}
Add worklog

POST /rest/api/3/issue/{issueIdOrKey}/worklog

Adds a worklog to an issue.

Time tracking must be enabled in Jira, otherwise this operation returns an error. For more
information, see Configuring time tracking.

This operation can be accessed anonymously.


Permissions required:

● Browse projects and Work on issues project permission for the project that the issue is in.
● If issue-level security is configured, issue-level security permission to view the issue.

Connect app scope required: WRITE

OAuth 2.0 scopes required:

ClassicRECOMMENDED:write:jira-work
Granular:write:issue-worklog:jira, write:issue-worklog.property:jira, read:avatar:jira,
read:group:jira, read:issue-worklog:jira ...(Show more)

Request

PATH PARAMETERS

issueIdOrKey REQUIRED

string
The ID or key the issue.

QUERY PARAMETERS

notifyUsers

boolean

Whether users watching the issue are notified by email.

Default: true
adjustEstimate

string

You might also like