[REST 1.1] Vacation documents

GET

Get vacation documents list

Returns list of vacation documents available to logged user

Permissions: ADMIN USER SUPERVISOR HR

GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document?teamId={teamId}

Responses: 200 404 500

Query params

Name

Type

Description

Name

Type

Description

teamId

Integer

Team ID

reporter

String

Name of reporter of vacation document

supervisor

String

Name of supervisor assigned to vacation document

startDate

String

Date that vacation have to start after. ISO 8601 format.

endDate

String

Date that vacation have to end before. ISO 8601 format.

periodStartDate

String

The start date of the vacation period for which we want a vacation list.

ISO 8601 format.

periodEndDate

String

The end date of the vacation period for which we want a vacation list.

ISO 8601 format.

When you set the periodStartDate and periodEndDate, you will search for vacation documents started/ongoing/ended during that period.

Path
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document?teamId=1
Response
[ { "issueId": 10600, "issueKey": "VACMAN-1", "reporter": { "id": 1, "name": "user", "displayName": "User", "active": true }, "supervisor": { "id": 2, "name": "supervisor", "displayName": "Supervisor", "active": true }, "status": "OPEN", "selectedPeriod": { "periodType": "DAILY", "startDateTime": 1540159200000, "endDateTime": 1540331999999, "startDate": 1540159200000, "endDate": 1540331999999, "usedDays": 0, "usedMinutes": 0 } }, { "issueId": 10502, "issueKey": "VACMAN-2", "reporter": { "id": 1, "name": "user", "displayName": "User", "active": true }, "supervisor": { "id": 2, "name": "supervisor", "displayName": "Supervisor", "active": true }, "status": "OPEN", "selectedPeriod": { "periodType": "HOURLY", "startDateTime": 1540371600000, "endDateTime": 1540378800000, "startDate": 1540371600000, "endDate": 1540378800000, "usedDays": 0, "usedMinutes": 0 } } ]

Get single vacation document

Returns information about existing vacation document.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 404 500

Path params

Name

Type

Description

Name

Type

Description

issueKey

String

Issue key

Request
Response

Get vacation documents waiting for approval

Returns vacation documents waiting for approval

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 500

Query params

Name

Type

Description

Name

Type

Description

reporter

String

Name of reporter of vacation document

supervisor

String

Name of supervisor assigned to vacation document

startDate

String

Date that vacation have to start after. ISO 8601 format.

endDate

String

Date that vacation have to end before. ISO 8601 format.

Path
Response

Get actions for vacation document

Returns available actions that could be executed upon vacation document.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 404 500

Path params

Name

Type

Description

Name

Type

Description

issueKey

String

Issue key

Path
Response

POST 

Create new vacation document

Create and returns new vacation document. It creates new Jira issue.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 201 400 500

JSON body fields

Name

Type

Description

Name

Type

Description

reporterName

String

Reporter name

supervisorName

String

Supervisor name

substituteName

String (Optional)

Substitute name

description

String (Optional)

Description for created issue

vacationKindId

Integer

Vacation document is created for vacation kind with this id

periodType

PeriodType

Period type

startDate

Start date of the leave for daily and half-daily requests. ISO 8601 format.

startDateTime

Start date time of the leave for hourly requests.  ISO 8601 format.

endDate

End date of the leave for daily requests.  ISO 8601 format.

halfDayType

Required for half-daily requests.

endTimeMinutes

Duration of hourly leave in minutes. Required for hourly request

PeriodType

Name

Type

Description

Name

Type

Description

DAILY

Enum

Daily peroid type

HALF_DAILY

Enum

Half daily period type

HOURLY

Enum

Hourly period type

HalfDayType

Name

Type

Description

Name

Type

Description

AM

Enum

First half of work day

PM

Enum

Second half of work day

Path

Body

Response

PUT

Update vacation document

Updates existing vacation document.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 201 400 404 500

JSON body fields

Name

Type

Description

Name

Type

Description

reporterName

String

Reporter name

supervisorName

String

Supervisor name

substituteName

String (Optional)

Substitute name

description

String (Optional)

Description for created issue

vacationKindId

Integer

Vacation document is created for vacation kind with this id

periodType

PeriodType

Period type

startDate

Start date of the leave for daily and half-daily requests. ISO 8601 format.

startDateTime

Start date time of the leave for hourly requests.  ISO 8601 format.

endDate

End date of the leave for daily requests.  ISO 8601 format.

halfDayType

Required for half-daily requests.

endTimeMinutes

Duration of hourly leave in minutes. Required for hourly request

PeriodType

Name

Type

Description

Name

Type

Description

DAILY

Enum

Daily peroid type

HALF_DAILY

Enum

Half daily period type

HOURLY

Enum

Hourly period type

HalfDayType

Name

Type

Description

Name

Type

Description

AM

Enum

First half of work day

PM

Enum

Second half of work day

Update status of vacation document

Updates status of vacation document.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 404 500

JSON body fields

Name

Type

Description

Name

Type

Description

issueKey

String

Key of issue to update status

actionId

Integer

Id of action to execute on issue in order to make transition. To retrieve available actions, see get actions

comment

String (optional)

Comment to add upon changing status. Some actions require comments

Feel free to tell us what topic should be covered: vacationmanager@psc-software.atlassian.net