Overview
Vacation Manager's REST API provides workweek scheme API which allows you to obtain:
- create workweek scheme
- update workweek scheme
- /wiki/spaces/VM/pages/281706592
- delete Workweek Scheme
- get workweek schemes list
- get single workweek scheme
- get workweek scheme for user
Methods:
GET
...
Table of Contents | ||||
---|---|---|---|---|
|
GET
Get workweek schemes list
Returns list of workweek schemes.
Path
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme |
...
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
...
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
Path
Response
|
...
Get single workweek scheme
Returns information about existing workweek scheme
...
Path
...
.
...
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Name | Type | Description |
---|---|---|
schemeId | int | Scheme ID |
Code Block | ||
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/{schemeId} |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
...
Path param
Name | Type | Description |
---|---|---|
schemeId | int | Scheme ID |
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
Path
Response
|
...
...
Get workweek scheme for user
Returns workweek scheme used by given user.
...
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme?userName={userName} |
...
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Name | Type | Description |
---|---|---|
userName | String | User Name |
Code Block | ||
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme?userName={userName} |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
...
Query params
Name | Type | Description |
---|---|---|
userName | String | User Name |
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
Path
Response
|
...
POST
...
Create
...
new workweek scheme
Creates and returns new workweek scheme.
...
Path
...
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme Permissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |||
---|---|---|---|
|
...
Status | ||||
---|---|---|---|---|
|
|
JSON body fields
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 |
---|---|---|
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 |
Status | ||||
---|---|---|---|---|
|
title |
---|
Status | ||||
---|---|---|---|---|
|
Example |
Path
| ||
Code Block | title | Path|
---|---|---|
POST {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme |
Body
Code Block | title | Body
---|
{
"name": "Workweek scheme name",
"workweekMinutes": {
"FRIDAY": 480,
"MONDAY": 400,
"WEDNESDAY": 800,
"SUNDAY": 0,
"TUESDAY": 480,
"SATURDAY": 0,
"THURSDAY": 400
},
"type": "SEPARATE_WORK_MINUTES_FOR_EACH_DAY"
} |
Response
Code Block | |
---|---|
Response |
...
PATCH
...
Update workweek scheme
Update and return existing workweek scheme.
...
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
PATCH {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/{schemeId} Permissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |
---|---|
|
...
|
...
|
Path params
Name | Type | Description |
---|---|---|
schemeId | int | Scheme ID |
JSON body fields
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 |
---|---|---|
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 |
Status | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
colour | Green | ||||||||||
title | 200 |
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Example
title | Example |
---|
title | Path |
---|
title | Example |
---|
Path
Code Block |
---|
PATCH {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/2 |
Body
Code Block | ||
---|---|---|
|
Response
Code Block | title | Response
---|
{ "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
Assign workweek scheme to users
Assigns workweek scheme to users.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
PUT {jira_baseurl} |
DELETE
...
Expand | ||
---|---|---|
| ||
Deletes existing workweek scheme./rest/vacation-manager/1.0/vacman-user/workweek/bulk |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
JSON body fields
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 |
Expand | ||
---|---|---|
| ||
Path
PermissionsADMIN USER SUPERVISOR HR Path params | ||
Name | Type | Description |
schemeId | int | Scheme ID |
/bulk |
Body
Code Block |
---|
{
"schemeId": 1,
"userNames": ["john", "jack"]
} |
Response
Code Block |
---|
{
"userNames": [
"john",
"jack"
],
"schemeId": 1
} |
...
DELETE
Delete workweek scheme
Deletes existing workweek scheme.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/{schemeId} |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
...
Path params
Name | Type | Description |
---|---|---|
schemeId | int | Scheme ID |
Expand | ||||
---|---|---|---|---|
| ||||
Path
|