Overview
Vacation Manager's REST API provides workweek scheme API which allows you to obtain:
Methods:
GET
...
GET
Get workweek schemes list
Returns list of workweek schemes
...
Path
...
.
...
...
Permissions:
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme |
Responses:
...
Expand |
---|
title
Code Block |
---|
| GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme |
Code Block |
---|
| [
{
"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
...
Returns information about existing workweek scheme.
Path
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/{schemeId} |
...
workweek scheme
Returns information about existing workweek scheme.
Permissions:
Path paramName | Type | Description |
---|
schemeId | int | Scheme ID |
Responses Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/{schemeId} |
Responses:
...
Path param
Name | Type | Description |
---|
schemeId | int | Scheme ID |
...
expand
Code Block |
---|
| GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/1 |
Code Block |
---|
| {
"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"
} |
|
...
Get workweek scheme for
...
Returns workweek scheme used by given user.
Path
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme?userName={userName} |
...
user
Returns workweek scheme used by given user.
Permissions:
Query params
Name | Type | Description |
---|
userName | String | User Name |
Responses Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme?userName={userName} |
Responses:
...
Query params
Name | Type | Description |
---|
userName | String | User Name |
Expand |
---|
|
Code Block |
---|
| PATH{jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme?userName=user1 |
|
...
Expand |
---|
title | Create new workweek scheme |
---|
|
Creates and returns new workweek scheme. Path Code Block |
---|
| {
"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"
} |
|
POST
...
...
POST
Create new workweek scheme
Creates and returns new workweek scheme.
Permissions:
Request /workweek-scheme
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme Permissions |
Responses:
...
...
...
...
...
...
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 |
...
Enum
...
Type of separate work minutes for each day
Responses
...
_EACH_DAY | Enum | Type of separate work minutes for each day |
Expand |
---|
|
Code Block |
---|
| POST {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme |
Code Block |
---|
| {
"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"
} |
|
...
Expand |
---|
title | Update workweek scheme |
---|
|
Update and return existing workweek scheme. Path Code Block |
---|
| {
"id": 101,
"name": "Workweek scheme name",
"workweekMinutes": {
"TUESDAY": 480,
"SUNDAY": 0,
"MONDAY": 400,
"WEDNESDAY": 800,
"FRIDAY": 480,
"THURSDAY": 400,
"SATURDAY": 0
},
"type": "SEPARATE_WORK_MINUTES_FOR_EACH_ DAY"
} |
|
PATCH
...
...
PATCH
Update workweek scheme
Update and return existing workweek scheme.
Permissions:
Code Block |
---|
PATCH {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/{schemeId} Permissions |
Responses:
...
...
...
...
...
...
...
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 |
...
Enum
...
Type of separate work minutes for each day
Responses
...
_EACH_DAY | Enum | Type of separate work minutes for each day |
Expand |
---|
|
Code Block |
---|
| PATCH {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/2 |
Code Block |
---|
| {
"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"
} |
|
...
Expand |
---|
title | Assign workweek scheme to users |
---|
|
Assigns workweek scheme to users. Path Code Block |
---|
| {
"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
...
...
PUT
Assign workweek scheme to users
Assigns workweek scheme to users.
Permissions:
Code Block |
---|
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacman-user/workweek/bulk Permissions |
Responses:
...
...
...
...
...
...
...
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 |
...
Responses
...
Expand |
---|
|
Code Block |
---|
| PUT {jira_baseurl}/rest/vacation-manager/1.0/vacman-user/workweek/bulk |
Code Block |
---|
| {
"schemeId": 1,
"userNames": ["john", "jack"]
} |
Code Block |
---|
| {
"userNames": [
"john",
"jack"
],
"schemeId": 1
} |
|
...
DELETE
...
title | Delete workweek scheme |
---|
Deletes existing workweek scheme.
Path
Delete workweek scheme
Deletes existing workweek scheme.
Permissions:
Code Block |
---|
DELETE {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/{schemeId} PermissionsADMIN USER SUPERVISOR HR Path params |
Name | Type | Description |
---|
schemeId | int | Scheme ID
Responses:
...
Path params
Name | Type | Description |
---|
schemeId | int | Scheme ID |
Expand |
---|
|
Code Block |
---|
| DELETE {jira_baseurl}/rest/vacation-manager/1.0/workweek-scheme/1 |
|