[REST 1.1] Workweek schemes

GET

Get workweek schemes list

Returns list of workweek schemes.

Permissions: ADMIN USER SUPERVISOR HR

GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme

Responses: 200 400 500

Path
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme
Response 
[ { "id": 1, "name": "Default workweek scheme", "workweekMinutes": { "TUESDAY": 480, "SUNDAY": 0, "MONDAY": 480, "WEDNESDAY": 480, "FRIDAY": 480, "THURSDAY": 480, "SATURDAY": 0 }, "type": "SEPARATE_WORK_MINUTES_FOR_EACH_DAY" }, { "id": 2, "name": "Workweek scheme 2", "workweekMinutes": { "TUESDAY": 480, "SUNDAY": 0, "MONDAY": 480, "WEDNESDAY": 480, "FRIDAY": 480, "THURSDAY": 480, "SATURDAY": 0 }, "type": "SAME_WORK_MINUTES_FOR_ALL_DAYS" }, { "id": 3, "name": "Workweek scheme 3", "workweekMinutes": { "TUESDAY": 480, "SUNDAY": 0, "MONDAY": 480, "WEDNESDAY": 400, "FRIDAY": 480, "THURSDAY": 400, "SATURDAY": 0 }, "type": "SEPARATE_WORK_MINUTES_FOR_EACH_DAY" } ]

Get single workweek scheme

Returns information about existing workweek scheme.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 500

Path param

Name

Type

Description

Name

Type

Description

schemeId

int

Scheme ID

Path
Response 

Get workweek scheme for user

Returns workweek scheme used by given user.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 500

Query params

Name

Type

Description

Name

Type

Description

userName

String

User Name

Path
Response

POST 

Create new workweek scheme

Creates and returns new workweek scheme.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 201 400 500

JSON body fields

Name

Type

Description

Name

Type

Description

name

String

Workweek scheme name

workweekMinutes

Map<DayOfWeek, Integer>

Day of week : working time in minutes

type

WorkweekSchemeType

Type of work week scheme

DayOfWeek

Name

Type

Description

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

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

Path
Body
Response

PATCH

Update workweek scheme

Update and return existing workweek scheme.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 404 500

Path params

Name

Type

Description

Name

Type

Description

schemeId

int

Scheme ID

JSON body fields

Name

Type

Description

Name

Type

Description

name

String

Workweek scheme name

workweekMinutes

Map<DayOfWeek, Integer>

Day of week : working time in minutes

type

WorkweekSchemeType

Type of work week scheme

DayOfWeek

Name

Type

Description

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

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

Path
Body
Response

PUT

Assign workweek scheme to users

Assigns workweek scheme to users.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 200 400 404 500

JSON body fields

Name

Type

Description

Name

Type

Description

schemeId

Id of workweek scheme you want to assign to users 

userNames

Names of users you want to assign workweek scheme to


DELETE

Delete workweek scheme

Deletes existing workweek scheme.

Permissions: ADMIN USER SUPERVISOR HR

Responses: 204 404 500

Path params

Name

Type

Description

Name

Type

Description

schemeId

int

Scheme ID

Feel free to tell us what topic should be covered: vacationmanager@psc-software.atlassian.net