[REST 1.1] Default vacation definitions

POST

Create default vacation definition

Creates default vacation definition for vacation type.

Permissions: ADMIN USER SUPERVISOR HR

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

Responses: 201 404 500

JSON body fields

Name

Type

Description

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)

Path
POST {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition
Body
{ "vacationTypeId": 2, "daysCountLimit": 20, "defaultPeriodType": "RECURRING_PERIOD_OFFSET", "periodOffset": 2 }
Response

GET

Get all default vacation definitions

Returns list of all default vacation definitions.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 500

Path
Response

Get default vacation definition object by Id

Returns default vacation definition object by its Id.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 404 500

Path params

Name

Type

Description

Name

Type

Description

defaultVacationDefinitionId

int

Id of default vacation definition object

Path
Response

Get default vacation definition object by Vacation Type

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

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 404 500

Path params

Name

Type

Description

Name

Type

Description

vacationTypeId

int

Id of vacation type

Path
Response

PUT

Update default vacation definition

Updates and returns default vacation definition object.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 404 500

Path params

Name

Type

Description

Name

Type

Description

defaultVacationDefinitionId

int

Id of default values object to update

JSON body fields

Same as in create default values endpoint.

Path
Body
Response

DELETE

Delete default vacation definition object by Id

Deletes default vacation definition object.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 204 404 500

Path params

Name

Type

Description

Name

Type

Description

defaultVacationDefinitionId

int

Id of default values object

Delete default vacation definition object for vacation type

Deletes default values object for given vacation type.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 204 404 500

Path params

Name

Type

Description

Name

Type

Description

vacationTypeId

int

Id of vacation type object to delete default values object from

 

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