Versions Compared

Key

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

Overview

Vacation Manager's REST API provides holiday API which allows you to:

Methods:

GET

Anchor
getHolidays
getHolidays

Expand
titleGet holidays list from scheme

Returns list of holidays assigned to given holiday scheme.

Path

Code Block
GET {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/{schemeId}/holiday

Permissions

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

Path params

Name

Type

Description

schemeId

int

scheme ID

Response

Status
colourGreen
title200
 
Status
colourYellow
title404
 
Status
colourRed
title500

Example

Expand
titleExample


Code Block
titlePath
GET {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday


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

Anchor
createHoliday
createHoliday

Expand
titleAdd holiday

Returns and creates new holiday in holiday scheme.

Path

Code Block
POST {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/{schemeId}/holiday

Permissions

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

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
colourGreen
title200
 
Status
colourYellow
title400
 
Status
colourYellow
title404
 
Status
colourRed
title500

Example

Expand
titleExample


Code Block
titlePath
POST {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday


Code Block
titleBody
{
   "date": "2018-12-25",
    "yearly": true,
    "description": "Christmas"
}


Code Block
titleResponse
{
	"id": 1,
    "date": "2018-12-25",
    "yearly": true,
    "description": "Christmas",
	"holidaySchemeId": 1	
}



PATCH

Anchor
updateHoliday
updateHoliday

Expand
titleUpdate holiday

Returns and Update existing holiday.

Path

Code Block
PATCH {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/{schemeId}/holiday/{holidayId}

Permissions

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

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

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

Example

Expand
titleExample


Code Block
titlePath
PATCH {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday/1


Code Block
titleBody
  {
    "date": "2019-01-01",
    "yearly": true,
    "description": "New year"
  }


Code Block
titleResponse
  {
	"id": 1,
    "date": "2019-01-01",
    "yearly": true,
    "description": "New year",
	"holidaySchemeId": 1
  }



DELETE

Anchor
deleteHoliday
deleteHoliday

Expand
titleDelete holiday from scheme

Deletes existing holiday.

Path

Code Block
DELETE {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/{schemeId}/holiday/{holidayId}

Permissions

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

Path params

Name

Type

Description

schemeId

int

scheme ID

holidayId

int

holiday ID

Responses

Status
colourGreen
title204
 
Status
colourYellow
title404
 
Status
colourRed
title500

Example

Expand
titleExample


Code Block
titlePath
DELETE {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday/1



...