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

Path

title
GET {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday
Code Block
Path
Response
Response
Code Block
title
[
    {
        "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

 
Status
colourGreen
title200
Status
colourYellow
title400
  StatuscolourYellowtitle404 
Status
colourRed
title500

Example

Expand
titleExample
Code Block
titlePath
Expand
titleExample
Path
Code Block
POST {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday
Body
{
   "date": "2018-12-25",
    "yearly": true,
    "description": "Christmas"
}
Code Block
titleBody
Response
title
{
	"id": 1,
    "date": "2018-12-25",
    "yearly": true,
    "description": "Christmas",
	"holidaySchemeId": 1	
}
Code Block
Response

...

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

 
Status
colourGreen
title200
Status
colourYellow
title400
  StatuscolourYellowtitle404  StatuscolourRed Expand
title
500
Example
Expandtitle
Path
title
PATCH {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday/1
Example
Code Block
Path
Body
  {
    "date": "2019-01-01",
    "yearly": true,
    "description": "New year"
  }
Code Block
titleBody
Response
  {
	"id": 1,
    "date": "2019-01-01",
    "yearly": true,
    "description": "New year",
	"holidaySchemeId": 1
  }
Code Block
titleResponse

...

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

 Yellow404 
Status
colourGreen
title204
Status
colour
Expand
title
Status
colourRed
title500
Example
expand
Path
Path
titleExample
Code Block
title
DELETE {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday/1