Versions Compared

Key

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

Overview

Vacation Manager's REST API provides workweek scheme API which allows you to obtain:

...

Expand
titleUpdate workweek scheme

Update and return existing workweek scheme.

Path

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

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

NameTypeDescription
nameStringWorkweek scheme name
workweekMinutesMap<DayOfWeek, Integer>Day of week : working time in minutes
typeWorkweekSchemeTypeType of work week scheme
DayOfWeek

Name

Type

Description

MONDAY

Enum

Monday

TUESDAY

Enum

Tuesday

WEDNESDAY

Enum

Wednesday

THURSDAY

Enum

Thursday

FRIDAY

Enum

Friday

SATURDAY

Enum

Saturday

SUNDAY

Enum

Sunday

WorkweekSchemeType
Name
Type
Description

SAME_WORK_MINUTES_FOR_ALL_DAYS

Enum

Type of the same work minutes for all days

SEPARATE_WORK_MINUTES_FOR_EACH_DAY

Enum

Type of separate work minutes for each day


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/workweek-scheme/2


Code Block
titleBody
 {
  "name": "Workweek scheme new name",
  "workweekMinutes": {
    "FRIDAY": 480,
    "MONDAY": 400,
    "WEDNESDAY": 800,
    "SUNDAY": 0,
    "TUESDAY": 480,
    "SATURDAY": 0,
    "THURSDAY": 400
  },
  "type": "SEPARATE_WORK_MINUTES_FOR_EACH_DAY"
}


Code Block
titleResponse
{
  "id": 2,
  "name": "Workweek scheme new name",
  "workweekMinutes": {
    "FRIDAY": 480,
    "MONDAY": 400,
    "WEDNESDAY": 800,
    "SUNDAY": 0,
    "TUESDAY": 480,
    "SATURDAY": 0,
    "THURSDAY": 400
  },
  "type": "SEPARATE_WORK_MINUTES_FOR_EACH_DAY"
}



PUT

Anchor
assignToUsers
assignToUsers

Expand
titleAssign workweek scheme to users

Assigns workweek scheme to users.

Path

Code Block
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacmanuser/workweek/bulk

Permissions

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

JSON body fields

NameTypeDescription
schemeId
Integer
Id of workweek scheme you want to assign to users 
userNames
Array<String>
Names of users you want to assign holiday scheme to

Responses

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

Example

Expand
titleExample


Code Block
titlePath
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacmanuser/workweek/bulk


Code Block
titleBody
{
   "schemeId": 1,
   "userNames": ["john", "jack"]
}


Code Block
titleResponse
{  
	"userNames": [
		"john", 
		"jack"
	],
   "schemeId": 1
}



DELETE

Anchor
Delete
Delete

Expand
titleDelete workweek scheme

Deletes existing workweek scheme.

Path

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

Permissions

ADMIN USER SUPERVISOR HR


Path params

Name
Type
Description
schemeIdintScheme 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/workweek-scheme/1



...