Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Each vacation type could have defined default vacation definitions - automatically assigned vacation days for new users.

...

Table of Contents
minLevel1
maxLevel2

POST

Create default vacation definition

Creates default vacation definition for vacation type

...

Methods

POST

...

titleCreate default vacation definition

Creates default vacation definition for vacation type.

...

.

Permissions:

Status
colourGreen
titleADMIN
 
Status
colourRed
titleUSER
 
Status
colourRed
titleSUPERVISOR
 
Status
colourRed
titleHR

Code Block
POST {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition
Permissions

Responses:

Status
colourGreen
title

...

201
 
Status
colour

...

Yellow
title

...

404
 
Status
colourRed
title

...

500

JSON body fields

Name

Type

Description

id

int

Object Id

vacationTypeId

int

Vacation Type Id

daysCountLimit

double

Number of days that will be assigned to user

defaultPeriodType

VacationTypeDefaultPeriodType

One of values:

  • ONE_TIME_DYNAMIC_DAYS_OFFSET

  • ONE_TIME_FIXED_DAYS_OFFSET

  • RECURRING_PERIOD_OFFSET

  • RECURRING_DYNAMIC_OFFSET

  • RECURRING_FIXED_OFFSET

dynamicOffset

String

Start date offset of vacation days after user is added to Vacation Manager, 1m 1w 1d format

(required for DYNAMIC defaultPeriodType)

dynamicDays

int

End date offset from dynamicOffset

(required for DYNAMIC defaultPeriodType)

fixedStartDate

String

Start date of vacation days, YYYY-MM-DD format

(required for FIXED defaultPeriodType)

fixedEndDate

String

End date of vacation days, YYYY-MM-DD format

(required for FIXED defaultPeriodType)

periodOffset

int

Start date offset in periods for new vacation days.

0 - current period

-1, -2... - previous periods

1, 2... - next periods

(required for PERIOD defaultPeriodType)

Responses

 
Status
colourGreen
title201
Status
colourYellow
title404
  StatuscolourRed Expand
title
500
Example
Expandtitle
Path
Path
Example
Code Block
title
POST {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition
Body
Body
Code Block
title
{
  "vacationTypeId": 2,
  "daysCountLimit": 20,
  "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
  "periodOffset": 2
}
Response
Response
Code Block
title
{
  "id": 2,
  "vacationTypeId": 2,
  "daysCountLimit": 20.0,
  "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
  "periodOffset": 2
}

...

GET

...

Get all default vacation definitions

Returns list of all default vacation definitions

...

Path

...

.

...

Permissions:

Status
colourGreen
titleADMIN
 
Status
colourRed
titleUSER
 
Status
colourRed
titleSUPERVISOR
 
Status
colourRed
titleHR

Code Block
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition

Responses:

Status
colourGreen
title200
 
Status
colourRed
title500

Example
Expand
titleExample

...

expand
Path
Path
Code Block
title
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition
Response
Response
Code Block
title
[
    {
        "id": 1,
        "vacationTypeId": 1,
        "daysCountLimit": 1.0,
        "defaultPeriodType": "ONE_TIME_DYNAMIC_DAYS_OFFSET",
        "dynamicOffset": "1",
        "dynamicDays": 1
    },
    {
        "id": 2,
        "vacationTypeId": 2,
        "daysCountLimit": 20.0,
        "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
        "periodOffset": 2
    }
]

...

title

Get default vacation definition object by Id

Returns default vacation definition object by its Id

...

Path

...

.

...

Permissions:

Status
colourGreen
titleADMIN
 
Status
colourRed
titleUSER
 
Status
colourRed
titleSUPERVISOR
 
Status
colourRed
titleHR

Path paramsResponses
NameTypeDescription
defaultVacationDefinitionIdintId of default vacation definition object
Code Block
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/{defaultVacationDefinitionId}

Responses:

Status
colourGreen
title200
 
Status
colourYellow
title404
 
Status
colourRed
title500

...

Path params

Name

Type

Description

defaultVacationDefinitionId

int

Id of default vacation definition object

Expand
titleExample

...

title
Expand
Path
Path
Code Block
title
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/1
Response
Response
Code Block
title
{
    "id": 1,
    "vacationTypeId": 1,
    "daysCountLimit": 1.0,
    "defaultPeriodType": "ONE_TIME_DYNAMIC_DAYS_OFFSET",
    "dynamicOffset": "1",
    "dynamicDays": 1
}

...

Get default vacation

...

definition object by Vacation Type

Returns default vacation definition object by Vacation Type that it's assigned to

...

Path

...

.

...

Permissions:

Status
colourGreen
titleADMIN
 
Status
colourRed
titleUSER
 
Status
colourRed
titleSUPERVISOR
 
Status
colourRed
titleHR

Path paramsResponses
NameTypeDescription
vacationTypeIdintId of vacation type
Code Block
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/vacation-type/{vacationTypeId}

Responses:

Status
colourGreen
title200
 
Status
colourYellow
title404
 
Status
colourRed
title500

...

Path params

Name

Type

Description

vacationTypeId

int

Id of vacation type

Expand
titleExample
Path
title
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/vacation-type/1
Code Block
Path
Response
title
[
    {
        "id": 1,
        "vacationTypeId": 1,
        "daysCountLimit": 1.0,
        "defaultPeriodType": "ONE_TIME_DYNAMIC_DAYS_OFFSET",
        "dynamicOffset": "1",
        "dynamicDays": 1
    }
]
Code Block
Response

...

PUT

...

Update default vacation definition

Updates and returns default vacation definition object.

...

Permissions:

Status
colourGreen
titleADMIN
 
Status
colourRed
titleUSER
 
Status
colourRed
titleSUPERVISOR
 
Status
colourRed
titleHR

Code Block
PUT {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/{defaultVacationDefinitionId}
Permissions

Responses:

Status
colourGreen
title

...

200
 
Status
colour

...

Yellow
title

...

400
 
Status
colour

...

Yellow
title

...

404
 
Status
colourRed
title

...

500

Path params

Name

Type

Description

defaultVacationDefinitionId

int

Id of default values object to update

JSON body fields

Same as in create default values endpoint.

Responses

Status
colourGreen
title200
  StatuscolourYellowtitle400 
Status
colourYellow
title404
  StatuscolourRed Expand
title
500
Example
Expandtitle
Path
Path
Example
Code Block
title
PUT {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/2
Body
Body
Code Block
title
{
  "vacationTypeId": 2,
  "daysCountLimit": 25,
  "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
  "periodOffset": 2
}
Response
Response
Code Block
title
{
    "id": 2,
    "vacationTypeId": 2,
    "daysCountLimit": 25.0,
    "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
    "periodOffset": 2
}

...

DELETE

...

Delete default vacation

...

definition object by Id

Deletes default vacation definition object

...

Path

...

.

...

Permissions:

Status
colourGreen
titleADMIN
 
Status
colourRed
titleUSER
 
Status
colourRed
titleSUPERVISOR
 
Status
colourRed
titleHR

Path params

Responses
NameTypeDescription
defaultVacationDefinitionIdintId of default values object
Code Block
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/{defaultVacationDefinitionId}

Responses:

Status
colourGreen
title204
 
Status
colourYellow
title404
 
Status
colourRed
title500

Path params

Name

Type

Description

defaultVacationDefinitionId

int

Id of default values object

Expand
titleExample

...

expand
Path
Path
Code Block
title
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/3

...

title

Delete default vacation definition object for vacation type

Deletes default values object for given vacation type.

...

Permissions:

Status
colourGreen
titleADMIN
 
Status
colourRed
titleUSER
 
Status
colourRed
titleSUPERVISOR
 
Status
colourRed
titleHR

Code Block
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/vacation-type/{vacationTypeId}
Permissions

Responses:

Status
colourGreen
title

...

204
 
Status
colour

...

Yellow
title

...

404
 
Status
colourRed
title

...

500

Path params

Name

Type

Description

vacationTypeId

int

Id of vacation type object to delete default values object from

...

Responses

...

Status
colourYellow
title404

...

Expand
titleExample
Path
Path
Code Block
title
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/vacation-type/5