Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Overview

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

Methods:

GET

 Get holidays list from scheme

Returns list of holidays assigned to given holiday scheme.

Path

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

Permissions

ADMIN USER SUPERVISOR HR

Path params

Name

Type

Description

schemeId

int

scheme ID

Response

200 404 500

Example

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

Path

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

Permissions

ADMIN USER SUPERVISOR HR

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 400 404 500

Example

 Example
Path
POST {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday
Body
{
   "date": "2018-12-25",
    "yearly": true,
    "description": "Christmas"
}
Response
{
	"id": 1,
    "date": "2018-12-25",
    "yearly": true,
    "description": "Christmas",
	"holidaySchemeId": 1	
}


PATCH

 Update holiday

Returns and Update existing holiday.

Path

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

Permissions

ADMIN USER SUPERVISOR HR

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

200 400 404 500

Example

 Example
Path
PATCH {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday/1
Body
  {
    "date": "2019-01-01",
    "yearly": true,
    "description": "New year"
  }
Response
  {
	"id": 1,
    "date": "2019-01-01",
    "yearly": true,
    "description": "New year",
	"holidaySchemeId": 1
  }


DELETE

 Delete holiday from scheme

Deletes existing holiday.

Path

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

Permissions

ADMIN USER SUPERVISOR HR

Path params

Name

Type

Description

schemeId

int

scheme ID

holidayId

int

holiday ID

Responses

204 404 500

Example

 Example
Path
DELETE {jira_baseurl}/rest/vacation-manager/1.0/holiday-scheme/1/holiday/1



  • No labels