1.1 Query log work hour list

post /rest/shdsd-Timesheet/3/worklog/search

API Documentation

Query work log data by conditions.

Media type

  • application/json

Request example

{ "issueId": 10338, "startDate":"2024-07-08", "endDate":"2024-07-08", "userKey": "JIRAUSER10000,JIRAUSER10001", "projectId": 10032, "runAs": "bruce", "startAt": 0, "maxResults": 10 }

Request BODY Details

Parameter

Type

Description

Required

Default Value

Parameter

Type

Description

Required

Default Value

startDate

String

Start time of the work log in the format yyyy-MM-dd

Required

 

endDate

String

End time of the work log in the format yyyy-MM-dd

Not required

<When left blank, it will be the same as startDate>

issueId

Number

Work log issue ID,Multiple issue IDs should be separated by commas

Not required

 

issueKey

String

Work log issue key, multiple issue keys should be separated by commas

Not required

 

userKey

String

User key for the work log, multiple users should be separated by commas

Not required

 

userName

String

Usernames for the work log, multiple users should be separated by commas

Not required

 

projectId

Number

Project ID for the work log

Not required

 

projectKey

String

Project key for the work log.

Not required

 

runAs

String

A single username, execute this time log query with the permissions of that user. When left blank, the returned content is not restricted by permissions.

Not required

 

startAt

Number

The starting position of the returned list data.

Not required

0

maxResults

Number

The maximum number of records to return in the list.

Not required

10

Return Example

{ "total": 2, -- Total number of work hour data "isLast": true, -- Whether the current returned result is the last page of the pagination "startAt": 0, -- The starting position of the returned list data "maxResults": 10, -- The maximum number of records to return in the list "values": [ { "overTimeStr": "0h", -- Overtime hours "timeWorkedStr": "1h 30m", -- Recorded duration "issueId": 10013, -- Isuue ID "author": { -- Relevant information of the associated person "userKey": "admin", "avatar": "http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10346", "userName": "admin", "displayName": "admin", "emailAddress": "admin@admin.com", "isActive": true, "isDel": false }, "overTime": null, -- Overtime hours (seconds) "timeWorked": 5400, -- Recorded working hours duration(seconds) "memo": "13123", -- Work hour remarks "projectKey": "TEST", -- Project key "createTime": "2024-06-27 18:08:28.435", -- Work hour creation time "startDate":"2024-06-27", -- Log time "auditTime": null, -- Review time "approve": { -- Reviewer information "userKey": "admin", "avatar": "http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10346", "userName": "admin", "displayName": "admin", "emailAddress": "admin@admin.com", "isActive": true, "isDel": false }, "workLogTypeName": "Requirement Design", -- Log type. "workLogType": "10005", -- Log type id "create": { -- Creator Information "userKey": "admin", "avatar": "http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10346", "userName": "admin", "displayName": "admin", "emailAddress": "admin@admin.com", "isActive": true, "isDel": false }, "id": 10304, "projectId": 10000, -- Project Id "unitSample": "h", -- Work Hour Unit "status": 0, -- Log Status "isAppendLog": false -- Is it a supplementary log record } ] }