Overview
Each vacation type could have defined default values vacation definitions - automatically assigned vacation days for new users.
Methods
POST
Anchor |
---|
| createDefaultValues |
---|
| createDefaultValues |
---|
|
Expand |
---|
title | Create 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
JSON body fieldsName | 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 Example Expand |
---|
|
Code Block |
---|
| POST {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition |
Code Block |
---|
| {
"vacationTypeId": 2,
"daysCountLimit": 20,
"defaultPeriodType": "RECURRING_PERIOD_OFFSET",
"periodOffset": 2
} |
Code Block |
---|
| {
"id": 2,
"vacationTypeId": 2,
"daysCountLimit": 20.0,
"defaultPeriodType": "RECURRING_PERIOD_OFFSET",
"periodOffset": 2
} |
|
|
...
Expand |
---|
title | Get 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
Responses
Example Expand |
---|
|
Code Block |
---|
| GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition |
Code Block |
---|
| [
{
"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 |
---|
title | Get 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
Path paramsName | Type | Description |
---|
defaultValueIddefaultVacationDefinitionId | int | Id of default value vacation definition object |
Responses Example Expand |
---|
|
Code Block |
---|
| GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition/1 |
Code Block |
---|
| {
"id": 1,
"vacationTypeId": 1,
"daysCountLimit": 1.0,
"defaultPeriodType": "ONE_TIME_DYNAMIC_DAYS_OFFSET",
"dynamicOffset": "1",
"dynamicDays": 1
} |
|
|
Anchor |
---|
| getDefaultValuesByVacationType |
---|
| getDefaultValuesByVacationType |
---|
|
Expand |
---|
title | Get 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
Path paramsName | Type | Description |
---|
vacationTypeId | int | Id of vacation type |
Responses Example Expand |
---|
|
Code Block |
---|
| GET {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-values/by-definition/vacation-type/1 |
Code Block |
---|
| [
{
"id": 1,
"vacationTypeId": 1,
"daysCountLimit": 1.0,
"defaultPeriodType": "ONE_TIME_DYNAMIC_DAYS_OFFSET",
"dynamicOffset": "1",
"dynamicDays": 1
}
] |
|
|
PUT
Anchor |
---|
| updateDefaultValues |
---|
| updateDefaultValues |
---|
|
Expand |
---|
title | Update 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
Path paramsName | Type | Description |
---|
defaultValuesIddefaultVacationDefinitionId | int | Id of default values object to update |
JSON body fieldsSame as in create default values endpoint. Responses Example Expand |
---|
|
Code Block |
---|
| PUT {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-valuesdefinition/2 |
Code Block |
---|
| {
"vacationTypeId": 2,
"daysCountLimit": 25,
"defaultPeriodType": "RECURRING_PERIOD_OFFSET",
"periodOffset": 2
} |
Code Block |
---|
| {
"id": 2,
"vacationTypeId": 2,
"daysCountLimit": 25.0,
"defaultPeriodType": "RECURRING_PERIOD_OFFSET",
"periodOffset": 2
} |
|
|
DELETE
Anchor |
---|
| deleteDefaultValuesById |
---|
| deleteDefaultValuesById |
---|
|
Expand |
---|
title | Delete 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 Path paramsName | Type | Description |
---|
defaultValuesIddefaultVacationDefinitionId | int | Id of default values object |
Responses Expand |
---|
|
Code Block |
---|
| DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-typedefinition/default-values/3 |
|
|
Anchor |
---|
| deleteDefaultValuesForVacationType |
---|
| deleteDefaultValuesForVacationType |
---|
|
Expand |
---|
title | Delete 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 Path paramsName | Type | Description |
---|
vacationTypeId | int | Id of vacation type object to delete default values object from |
Responses Expand |
---|
|
Code Block |
---|
| DELETE {jira_baseurl}/rest/vacation-manager/1.0/default-vacation-type/default-values/by-definition/vacation-type/5 |
|
|