4.1 Query leave records

get /rest/shdsd-Timesheet/3/leave

API Documentation

Query leave record data based on conditions.

Media type

  • application/json

Request example

{JiraHost}/rest/shdsd-Timesheet/3/leave?startDate=2024-07-09&endDate=2024-08-01&userName=huihui,bruce&typeId=1&year=2024&month=04&startAt=0&maxResults=10

Request BODY Details

Parameter

Type

Description

Required

Default Value

Parameter

Type

Description

Required

Default Value

startDate

String

Start date of the leave record yyyy-MM-dd.

Not required

 

endDate

String

End date of the leave record yyyy-MM-dd.

Not required

 

userName

String

Username of the leave record, multiple users separated by commas.

Not required

 

userKey

String

User Key of the leave record, multiple users separated by commas. Invalid when used simultaneously with userName.

Not required

 

typeId

String

ID of the leave type.

Not required

 

year

String

Year of the leave record, e.g., 2024.

Required

 

month

String

Month of the leave record, must be two digits long, e.g., 06.

Not required

 

startAt

Number

Starting position for the returned list data.

Not required

0

maxResults

Number

Maximum number of records to return in the list.

Not required

10

Return Example

{ "total": 1, -- Total number of leave records "isLast": true, -- Whether the current returned result is the last page of pagination "startAt": 0, -- Starting position for the returned list data "maxResults": 10, -- Maximum number of records to return in the list "values": [ { "id": 5, -- ID of the leave record "user": { -- Submitter of the leave record "userKey": "JIRAUSER10000", "avatar": "http://192.168.80.15:32395/secure/useravatar?size=xsmall&avatarId=10502", "userName": "admin", "displayName": "admini", "emailAddress": "hui.yin@shdsd.com", "isActive": true, "isDel": false }, "typeId": 1, -- ID of the leave type "typeName": "Compensatory leave", -- Name of the leave type "isPaid": 1, -- Whether it is paid leave "leaveTime": "2024-02-27", -- Leave date "leaveSeconds": 3600, -- Duration of leave(seconds) "dailyLeaveTime": "1h" -- Duration of leave } ] }