2.1 Query the audit log list

get /rest/shdsd-Timesheet/3/auditLog

API Documentation

Query information related to work hour data.

Media type

  • application/json

Request example

{JiraHost}/rest/shdsd-Timesheet/3/auditLog?mode=audit&startDate=2024-07-09&endDate=2024-08-01&projectIds=10032,10033&issueKeys=IK-556,IK-557&runAs=bruce&startAt=0&maxResults=10

Query parameters

Parameter

Type

Description

Required

Default Value

Parameter

Type

Description

Required

Default Value

mode

String

audit:Retrieve the list of pending review logs for the approver.

view:Retrieve the list of pending review logs for oneself.

revoke-audit:Retrieve the list of requests to withdraw approved work hours for the approver.

revoke-view:Retrieve the list of requests submitted by oneself to withdraw approved work hours.

Not required

view

startDate

String

The start time of the work log is in the format yyyy-MM-dd, and it is mandatory in "audit" or "view" mode.

Not required

 

endDate

String

The end time of the work log is in the format yyyy-MM-dd, and it is mandatory in "audit" or "view" mode.

Not required

 

projectIds

String

The project ID of the work log, separated by commas for multiple projects.

Not required

 

projectKeys

String

The project key of the work log, separated by commas for multiple projects.

Not required

 

issueIds

String

The issue ID of the work log, separated by commas for multiple issues.

Not required

 

issueKeys

String

The issue key of the work log, separated by commas for multiple issues.

Not required

 

runAs

String

A single username to execute this audit log query with the user's permissions. When left blank, the returned content will not be 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, -- Return the maximum number of records in the list "values": [ { "log": { -- Working hours content "id": 10700, -- Work hour ID "author": "JIRAUSER11800", "authorUser": { -- Personal information related to working hours "userKey": "JIRAUSER11800", "avatar": "http://192.168.80.15:32395/secure/useravatar?size=xsmall&avatarId=10335", "userName": "pluto", "displayName": "pluto", "emailAddress": "useremail022@test.com", "isActive": true, "isDel": false }, "issueId": 13205, "issueKey": "AAA-2", "projectId": 11100, "projectKey": "AAA", "createTime": "2024-07-25 00:40:29.858", -- Fill in the time for working hours "updateTime": "2024-07-25 00:40:29.858", -- Time to update working hours "startDate": "2024-07-25", -- Working hours and dates "timeWorked": 3600, -- Working hours used(seconds) "timeWorkedStr": "1h", -- Working hours used "memo": "333", -- Work hour remarks "deleteOthersWorkLog": false, "editOthersWorkLog": false }, "audit": { -- Work hour audit content "id": 139, "auditor": "JIRAUSER10000", "auditorUser": { -- Information related to the hour auditor "userKey": "JIRAUSER10000", "avatar": "http://192.168.80.15:32395/secure/useravatar?size=xsmall&avatarId=10502", "userName": "admin", "displayName": "admini", "emailAddress": "huihui@test.com", "isActive": true, "isDel": false }, "status": 1, -- Work hour audit status 0 not submitted 1 Pending approval 2 Audited "auditTime": "2024-07-25 01:10:54", -- Work hour review time "auditComment": "buxing" -- Work hour audit instructions }, "revoke": { -- Application for withdrawal of working hours "undoReason": "I filled it in incorrectly", "rejectReason": "No need to modify", "status": 1, -- Status of work hour withdrawal application 0 applying 1 Agreed 2 REJECTED },      } ] }