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

...

Table of Contents
minLevel1
maxLevel2

GET

Get holidays list from scheme

Returns list of holidays assigned to given holiday scheme

...

Path

...

.

...

Permissions:

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

Path params

Response
NameTypeDescription
schemeId

int

scheme ID

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

Response:

Status
colourGreen
title200
 
Status
colourYellow
title404
 
Status
colourRed
title500

...

Path params

Name

Type

Description

schemeId

int

scheme ID

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 

...

Add holiday

Returns and creates new holiday in holiday scheme.

...

Permissions:

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

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

Responses:

Status
colourGreen
title

...

200
 
Status
colour

...

Yellow
title

...

400
 
Status
colour

...

Yellow
title

...

404
 
Status
colour

...

Red
title

...

500

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

...

 
200
Status
colourYellow
title400
  StatuscolourYellowtitle404 
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

...

Update holiday

Returns and Update existing holiday.

...

Permissions:

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

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

Responses:

Status
colourGreen
title

...

200
 
Status
colour

...

Yellow
title

...

400
 
Status
colour

...

Yellow
title

...

404
 
Status
colour

...

Red
title

...

500

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

...

  
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

...

...

Delete holiday from scheme

Deletes existing holiday.

...

Permissions:

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

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

Responses:

Status
colourGreen
title

...

204
 
Status
colour

...

Yellow
title

...

404
 
Status
colourRed
title

...

Status
colourGreen
titleHR

500

Path params

Name

Type

Description

schemeId

int

scheme ID

holidayId

int

holiday ID

...

Responses

...

Status
colourYellow
title404

...

Status
colourRed
title500

...

Expand
titleExample


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