Overview
Each vacation type could have defined default values - automatically assigned vacation days for new users.
Methods
POST
...
title | Create default values |
---|
Creates default values for vacation type.
...
POST
Create default vacation definition
Creates default vacation definition for vacation type.
Permissions:
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-valuesPermissionsdefinition |
Responses:
...
...
...
...
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: |
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 |
---|
colour | Green |
---|
title | 201 |
Example
Expand |
---|
|
Code Block |
---|
title | Path Expand |
---|
|
Path Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-valuesdefinition |
Body Code Block |
---|
title | Body |
---|
{
"vacationTypeId": 2,
"daysCountLimit": 20,
"defaultPeriodType": "RECURRING_PERIOD_OFFSET",
"periodOffset": 2
} |
Response Code Block |
---|
title | Response |
---|
{
"id": 2,
"vacationTypeId": 2,
"daysCountLimit": 20.0,
"defaultPeriodType": "RECURRING_PERIOD_OFFSET",
"periodOffset": 2
} |
|
...
GET
...
Get all default
...
vacation definitions
Returns list of all default
...
Path
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/default-values |
...
vacation definitions.
Permissions:
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition |
Responses:
...
...
Expand |
---|
titlePath Code Block |
---|
title | Path |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-valuesdefinition |
Response Code Block |
---|
title | Response |
---|
[
{
"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
}
] |
|
...
Get default
...
vacation definition object by Id
Returns default
...
vacation definition object by its Id
...
Path
...
.
...
Permissions:
Path paramsName | Type | Description |
---|
defaultValueId | int | Id of default value object |
Responses Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/{defaultVacationDefinitionId} |
Responses:
...
Path params
Name | Type | Description |
---|
defaultVacationDefinitionId | int | Id of default vacation definition object |
...
Expand |
---|
titlePath Code Block |
---|
title | Path |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-valuesdefinition/1 |
Response Code Block |
---|
title | Response |
---|
{
"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:
Path paramsName | Type | Description |
---|
vacationTypeId | int | Id of vacation type |
Responses Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/vacation-type/{vacationTypeId} |
Responses:
...
Path params
Name | Type | Description |
---|
vacationTypeId | int | Id of vacation type |
Expand |
---|
|
Path Code Block |
---|
title | Path |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-values/by-definition/vacation-type/1 |
Response Code Block |
---|
title | Response |
---|
[
{
"id": 1,
"vacationTypeId": 1,
"daysCountLimit": 1.0,
"defaultPeriodType": "ONE_TIME_DYNAMIC_DAYS_OFFSET",
"dynamicOffset": "1",
"dynamicDays": 1
}
] |
|
...
PUT
...
Update default
...
vacation definition
Updates and returns default
...
vacation definition object.
Permissions:
Code Block |
---|
PUT {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-valuesdefinition/{ defaultValuesIddefaultVacationDefinitionId} Permissions |
Responses:
...
...
...
...
...
...
Path params
...
defaultVacationDefinitionId | int | Id of default values object to update |
JSON body fields
Same as in create default values endpoint.
Responses
Status |
---|
colour | Yellow |
---|
title | 400 |
Example
Expand |
---|
|
Code Block |
---|
title | Path Expand |
---|
|
Path Code Block |
---|
PUT {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-valuesdefinition/2 |
Body Code Block |
---|
title | Body |
---|
{
"vacationTypeId": 2,
"daysCountLimit": 25,
"defaultPeriodType": "RECURRING_PERIOD_OFFSET",
"periodOffset": 2
} |
Response Code Block |
---|
title | Response |
---|
{
"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
...
...
DELETE {jira_baseurl}/rest/vacation-manager/1.0/vacation-type/default-values/{defaultValuesId}
...
Permissions:
Path params
Name | Type | Description |
---|
defaultValuesId | int | Id of default values object |
Responses Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-definition/{defaultVacationDefinitionId} |
Responses:
Path params
Name | Type | Description |
---|
defaultVacationDefinitionId | int | Id of default values object |
...
Expand |
---|
titlePath Code Block |
---|
title | Path |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-valuesdefinition/3 |
|
...
Delete default
...
vacation definition object for vacation type
Deletes default values object for given vacation type.
...
Permissions:
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-values/by-definition/vacation-type/{vacationTypeId} Permissions |
Responses:
...
...
...
...
Path params
Name | Type | Description |
---|
vacationTypeId | int | Id of vacation type object to delete default values object from |
...
Responses
...
title | 404 |
Expand |
---|
|
Path Code Block |
---|
title | Path |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation- type/default-values/by-definition/vacation-type/5 |
|