Versions Compared

Key

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

Overview

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

Methods

POST

Anchor
createDefaultValues
createDefaultValues

Expand
titleCreate default valuesvacation definition

Creates default values vacation definition for vacation type.

Path

Code Block
POST {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition

Permissions

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


JSON body fields

NameTypeDescription
idintObject Id
vacationTypeIdintVacation Type Id
daysCountLimitdoubleNumber of days that will be assigned to user
defaultPeriodTypeVacationTypeDefaultPeriodType

One of values:

  • ONE_TIME_DYNAMIC_DAYS_OFFSET
  • ONE_TIME_FIXED_DAYS_OFFSET
  • RECURRING_PERIOD_OFFSET
  • RECURRING_DYNAMIC_OFFSET
  • RECURRING_FIXED_OFFSET
dynamicOffsetString

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

(required for DYNAMIC defaultPeriodType)

dynamicDaysint

End date offset from dynamicOffset

(required for DYNAMIC defaultPeriodType)

fixedStartDateString

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

(required for FIXED defaultPeriodType)

fixedEndDateString

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

(required for FIXED defaultPeriodType)

periodOffsetint

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
 
Status
colourRed
title500

Example

Expand
titleExample


Code Block
titlePath
POST {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition


Code Block
titleBody
{
  "vacationTypeId": 2,
  "daysCountLimit": 20,
  "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
  "periodOffset": 2
}


Code Block
titleResponse
{
  "id": 2,
  "vacationTypeId": 2,
  "daysCountLimit": 20.0,
  "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
  "periodOffset": 2
}



...

Expand
titleGet all default valuesvacation definitions

Returns list of all default valuesvacation definitions.

Path

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

Permissions

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


Responses

Status
colourGreen
title200
 
Status
colourRed
title500


Example

Expand
titleExample


Code Block
titlePath
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition


Code Block
titleResponse
[
    {
        "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
    }
]



Anchor
getDefaultValuesById
getDefaultValuesById

Expand
titleGet default values vacation definition object by Id

Returns default value vacation definition object by its Id.

Path

Code Block
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-typedefinition/default-values/{defaultValueIddefaultVacationDefinitionId}

Permissions

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


Path params

NameTypeDescription
defaultValueIddefaultVacationDefinitionIdintId of default value vacation definition object

Responses

Status
colourGreen
title200
 
Status
colourYellow
title404
 
Status
colourRed
title500

Example

Expand
titleExample


Code Block
titlePath
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition/1


Code Block
titleResponse
{
    "id": 1,
    "vacationTypeId": 1,
    "daysCountLimit": 1.0,
    "defaultPeriodType": "ONE_TIME_DYNAMIC_DAYS_OFFSET",
    "dynamicOffset": "1",
    "dynamicDays": 1
}



Anchor
getDefaultValuesByVacationType
getDefaultValuesByVacationType

Expand
titleGet default values vacation defintion object by Vacation Type

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

Path

Code Block
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-values/by-definition/vacation-type/{vacationTypeId}

Permissions

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


Path params

NameTypeDescription
vacationTypeIdintId of vacation type

Responses

Status
colourGreen
title200
 
Status
colourYellow
title404
 
Status
colourRed
title500

Example

Expand
titleExample


Code Block
titlePath
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-values/by-definition/vacation-type/1


Code Block
titleResponse
[
    {
        "id": 1,
        "vacationTypeId": 1,
        "daysCountLimit": 1.0,
        "defaultPeriodType": "ONE_TIME_DYNAMIC_DAYS_OFFSET",
        "dynamicOffset": "1",
        "dynamicDays": 1
    }
]



PUT

Anchor
updateDefaultValues
updateDefaultValues

Expand
titleUpdate default valuesvacation definition

Updates and returns default values vacation definition object.

Path

Code Block
PUT {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition/{defaultValuesIddefaultVacationDefinitionId}

Permissions

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


Path params

NameTypeDescription
defaultValuesIddefaultVacationDefinitionIdintId of default values object to update

JSON body fields

Same as in create default values endpoint.

Responses

Status
colourGreen
title200
 
Status
colourYellow
title400
 
Status
colourYellow
title404
 
Status
colourRed
title500

Example

Expand
titleExample


Code Block
titlePath
PUT {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition/2


Code Block
titleBody
{
  "vacationTypeId": 2,
  "daysCountLimit": 25,
  "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
  "periodOffset": 2
}


Code Block
titleResponse
{
    "id": 2,
    "vacationTypeId": 2,
    "daysCountLimit": 25.0,
    "defaultPeriodType": "RECURRING_PERIOD_OFFSET",
    "periodOffset": 2
}



DELETE

Anchor
deleteDefaultValuesById
deleteDefaultValuesById

Expand
titleDelete default values vacation defintion object by Id

Deletes default values vacation definition object.

Path

Code Block
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-typedefinition/default-values/{defaultValuesIddefaultVacationDefinitionId}

Permissions

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

Path params

NameTypeDescription
defaultValuesIddefaultVacationDefinitionIdintId of default values object

Responses

Status
colourGreen
title204
 
Status
colourYellow
title404
 
Status
colourRed
title500

Expand
titleExample


Code Block
titlePath
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-typedefinition/default-values/3



Anchor
deleteDefaultValuesForVacationType
deleteDefaultValuesForVacationType

Expand
titleDelete default values vacation definition object for vacation type

Deletes default values object for given vacation type.

Path

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

Permissions

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

Path params

NameTypeDescription
vacationTypeIdintId of vacation type object to delete default values object from

Responses

Status
colourGreen
title204
 
Status
colourYellow
title404
 
Status
colourRed
title500

Expand
titleExample


Code Block
titlePath
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-values/by-definition/vacation-type/5