Overview
Vacation Manager's REST API provides holiday API which allows you to:
Methods:
GET
...
GET
Get holidays list from scheme
Returns list of holidays assigned to given holiday scheme
...
Path
...
.
...
Permissions:
Path params
Name | Type | Description |
---|
schemeId | int | scheme ID |
Response Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/{schemeId}/holiday |
Response:
...
Path params
Name | Type | Description |
---|
schemeId | int | scheme ID |
Expand |
---|
|
Path Code Block | title |
---|
| Path | GET {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday
Response Code Block |
---|
| | [
{
"id": 1,
"date": "1970-12-25",
"yearly": true,
"description": "Christmas",
"holidaySchemeId": 1
},
{
"id": 2,
"date": "1970-01-01",
"yearly": true,
"description": "New year",
"holidaySchemeId": 1
}
]
|
...
POST
...
Add holiday
Returns and creates new holiday in holiday scheme.
...
Permissions:
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/{schemeId}/holiday Permissions |
Responses:
...
...
...
...
...
...
...
Path params
Name | Type | Description |
---|
schemeId | int | scheme ID |
JSON body fields
Name | Type | Description |
---|
date | String | Holiday date. ISO 8601 format. |
yearly | Boolean | true - holiday is repeated yearly, false - holiday occurs one time, on selected date |
description | String | Holiday description |
Responses
Status |
---|
colour | Green Expand |
---|
| 200 | Example
Expand |
---|
|
Code Block |
---|
|
| Path Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday |
Body Code Block | title |
---|
| Body | {
"date": "2018-12-25",
"yearly": true,
"description": "Christmas"
}
Response Code Block | title |
---|
| Response | {
"id": 1,
"date": "2018-12-25",
"yearly": true,
"description": "Christmas",
"holidaySchemeId": 1
}
|
...
PATCH
...
Update holiday
Returns and Update existing holiday.
...
Permissions:
Code Block |
---|
PATCH {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/{schemeId}/holiday/{holidayId} Permissions |
Responses:
...
...
...
...
...
...
...
Path params
Name | Type | Description |
---|
schemeId | int | scheme ID |
holidayId | int | holiday ID |
JSON body fields
Name | Type | Description |
---|
date | String | Holiday date. ISO 8601 format. |
yearly | Boolean | true - holiday is repeated yearly, false - holiday occurs one time, on selected date |
description | String | Holiday description |
Responses
Example
Expand |
---|
|
Code Block |
---|
|
Expand |
---|
|
Path Code Block |
---|
PATCH {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday/1 |
Body Code Block |
---|
| | {
"date": "2019-01-01",
"yearly": true,
"description": "New year"
}
Response Code Block | title |
---|
| Response | {
"id": 1,
"date": "2019-01-01",
"yearly": true,
"description": "New year",
"holidaySchemeId": 1
}
|
...
DELETE
...
...
Delete holiday from scheme
Deletes existing holiday.
...
Permissions:
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/{schemeId}/holiday/{holidayId} Permissions |
Responses:
...
...
...
...
Path params
Name | Type | Description |
---|
schemeId | int | scheme ID |
holidayId | int | holiday ID |
Responses
Status |
---|
colour | Green Expand |
---|
| 204 | status |
|
| expandPath | Code Block |
---|
title | Path |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday/1 |
|