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 6 Current »

GET

Get holidays list from scheme

Returns list of holidays assigned to given holiday scheme.

Permissions: ADMIN USER SUPERVISOR HR

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

Response: 200 404 500

Path params

Name

Type

Description

schemeId

int

scheme ID

 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.

Permissions: ADMIN USER SUPERVISOR HR

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

Responses: 200 400 404 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

 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.

Permissions: ADMIN USER SUPERVISOR HR

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

Responses: 200 400 404 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

 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.

Permissions: ADMIN USER SUPERVISOR HR

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

Responses: 204 404 500

Path params

Name

Type

Description

schemeId

int

scheme ID

holidayId

int

holiday ID

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