GET

Get single vacation type

Returns information about specific vacation type.

Permissions:    

GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/{vacationTypeId}

Responses:   

Path params

Name

Type

Description

vacationTypeId

int

Vacation type Id

Path

GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/1
Response
{
  "id": 1,
  "name": "name",
  "issueTypeId": "1",
  "vacationKindType": "ONE_TIME",
  "validThrough": false,
  "hasDayLimit": false,
  "carryOver": false,
  "description": "",
  "vacationDocumentPeriodType": "DAILY"
}

Get vacation types list

Returns information about all vacation type.

Permissions:    

GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-type

Responses:  

Path
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-type
Response
[
  {
    "id": 1,
    "name": "vacation type 1",
    "issueTypeId": "1",
    "vacationKindType": "ONE_TIME",
    "validThrough": false,
    "hasDayLimit": false,
    "carryOver": false,
    "description": "",
    "vacationDocumentPeriodType": "DAILY"
  },
  {
    "id": 2,
    "name": "vacation type 2",
    "issueTypeId": "2",
    "vacationKindType": "RECURRING",
    "validThrough": false,
    "hasDayLimit": true,
    "carryOver": true,
    "periodDefinition": {
      "type": "MONTHS",
      "value": 12,
      "start": "2018-10-10"
    },
    "description": "",
    "vacationDocumentPeriodType": "DAILY_OR_HALF_DAILY"
  }
]

Get vacation type update information

Returns information required for update about specific vacation type.

Permissions:    

GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/{vacationTypeId}/update-info

Responses:   

Path params

Name

Type

Description

vacationTypeId

int

Vacation type Id

Path
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/1/update-info

Response

{
  "anyInstanceHasAvailableHalfDay": false,
  "anyInstanceHasNonZeroAvailableMinutes": false
}

POST

Create vacation type

Creates and returns new vacation type.

Permissions:    

POST {jira_baseurl}/rest/vacation-manager/1.0/vacation-type

Response:   

JSON body fields

Name

Type

Description

name

String

Name of new vacation type (this is also name for issue type associated with that new vacation type).

description

String (optional)

Description of vacation type.

kindType

KindType

Kind of new vaction type.

vacationDocumentPeriodType

VacationDocumentPeriodType

Type of available vacation document period.

periodDefinition

Object (required if kindType is RECURRING)

PeriodDefinition object for recurring vacation type.

hasCarryOver

bool (required if kindType is RECURRING)

Specifies if unused days will be transferred to new vacation periods.

hasEndDate

bool (required if kindType is ONE_TIME)

Specifies if assigned vacation days will be having expiration date.

hasDayLimit

bool (required if kindType is ONE_TIME)

Specifies if there will be limit of days that user can use in this vacation type.

defaultDayLimit

int

Default vacation days limit for vacation type. This value will be suggested when HR will be assigning new vacation days for users.

useWorklog

bool

Save used time to worklog.

carryoverClearPeriodDefinition

Object (optional if kindType is RECURRING)

CarryoverClearPeriodDefinition object for recurring vacation type. Specifies period after carryover days will be cleared.

PeriodDefinition

Name

Type

Description

type

PeriodDefinitionType

Type of recurring period.

Currently only monthly period is available.

value

int

Number of months in recurring period.

Valid values: 1, 2, 3, 4, 6, 12

startDate

Date

Date of when period will start. ISO 8601 format.

VacationDocumentPeriodType

Name

Type

Description

DAILY

Enum

Vacation type for daily vacations

DAILY_OR_HALF_DAILY 

Enum

Vacation type for daily and half daily vacations

DAILY_OR_HOURLY

Enum

Vacation type for hourly vacations

KindType

Name

Type

Description

ONE_TIME

Enum

Vacation kind type for one time vacations

RECURRING

Enum

Vacation kind  type for recurring vacations

PeriodDefinitionType

Name

Type

Description

MONTHS

Enum

Type of monthly recurring period

CarryoverClearPeriodDefinition

Name

Type

Description

type

CarryoverClearPeriodDefinitionType

Type of carryover days clear period.

Currently only daily period is available.

value

int

Number of days in carryover days clear period.

CarryoverClearPeriodDefinitionType

Name

Type

Description

DAYS

Enum

Type of daily carryover days clear period.

Path

POST {jira_baseurl}/rest/vacation-manager/1.0/vacation-type
Body
{
    "name": "Vacation type name",
    "kindType": "ONE_TIME",
    "hasEndDate": false,
    "hasDayLimit": false,
	"vacationDocumentPeriodType": "DAILY",
	"useWorklog": false
}
Response 
{
    "id": 2,
    "name": "Vacation type name",
    "issueTypeId": "10101",
    "kindType": "ONE_TIME",
    "periodDefinition": {},
    "hasEndDate": false,
    "hasDayLimit": false,
    "hasCarryOver": false,
	"useWorklog": false,
    "vacationDocumentPeriodType": "DAILY"
}

PUT

Update vacation type

Updates and returns vacation type.

Permissions:    

PUT {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/{vacationTypeId}

Responses:    

Path params

Name

Type

Description

vacationTypeId

int

Vacation type Id

JSON body fields

Name

Type

Description

vacationDocumentPeriodType

VacationDocumentPeriodType

Type of vacation requests period.

changeHalfDaysToFullDays

Boolean (optional)

When changing vacation type from "daily or half-daily" to "daily only", this option allows to convert half day left over to full day

minutesCountToChangeToFullDays

Integer (optional)

When changing vacation type from "daily or hourly" to "daily only", this option allows to specify how many minutes is required to grant full day off when somebody has spare minutes or hours

minutesCountToChangeToHalfDays

Integer (optional)

When changing vacation type from "daily or hourly" to "daily or half-daily", this option allows to specify how many minutes is required to grant half day off when somebody has spare minutes or hours

minutesCountToGetFromHalfDays

Integer (optional)

When changing vacation type from "daily or half-daily" to "daily or hourly", this option allows to specify how many minutes is granted when someone has available half day

VacationDocumentPeriodType

Name

Type

Description

DAILY

Enum

Vacation type for daily vacations

DAILY_OR_HALF_DAILY 

Enum

Vacation type for daily and half daily vacations

DAILY_OR_HOURLY

Enum

Vacation type for hourly vacations

Path
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/1
Body
{
  "vacationDocumentPeriodType":"DAILY"
}
Response
{
  "id": 1,
  "name": "vacation type 1",
  "issueTypeId": "1",
  "vacationKindType": "ONE_TIME",
  "validThrough": false,
  "hasDayLimit": false,
  "carryOver": false,
  "description": "",
  "vacationDocumentPeriodType": "DAILY"
}

DELETE

Delete vacation type

Deletes vacation type.

Permissions:    

DELETE {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/{vacationTypeId}

Responses:   

Path params

Name

Type

Description

vacationTypeId

int

Vacation type Id

Path
DELETE {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/1