[REST 1.1] Vacation documents
GET
Get vacation documents list
Returns list of vacation documents available to logged user
Permissions: ADMIN USER SUPERVISOR HR
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document?teamId={teamId}Responses: 200 404 500
Query params
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
teamId | Integer | Team ID |
reporter | String | Name of reporter of vacation document |
supervisor | String | Name of supervisor assigned to vacation document |
startDate | String | Date that vacation have to start after. ISO 8601 format. |
endDate | String | Date that vacation have to end before. ISO 8601 format. |
periodStartDate | String | The start date of the vacation period for which we want a vacation list. ISO 8601 format. |
periodEndDate | String | The end date of the vacation period for which we want a vacation list. ISO 8601 format. When you set the periodStartDate and periodEndDate, you will search for vacation documents started/ongoing/ended during that period. |
Path
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document?teamId=1Response
[
{
"issueId": 10600,
"issueKey": "VACMAN-1",
"reporter": {
"id": 1,
"name": "user",
"displayName": "User",
"active": true
},
"supervisor": {
"id": 2,
"name": "supervisor",
"displayName": "Supervisor",
"active": true
},
"status": "OPEN",
"selectedPeriod": {
"periodType": "DAILY",
"startDateTime": 1540159200000,
"endDateTime": 1540331999999,
"startDate": 1540159200000,
"endDate": 1540331999999,
"usedDays": 0,
"usedMinutes": 0
}
},
{
"issueId": 10502,
"issueKey": "VACMAN-2",
"reporter": {
"id": 1,
"name": "user",
"displayName": "User",
"active": true
},
"supervisor": {
"id": 2,
"name": "supervisor",
"displayName": "Supervisor",
"active": true
},
"status": "OPEN",
"selectedPeriod": {
"periodType": "HOURLY",
"startDateTime": 1540371600000,
"endDateTime": 1540378800000,
"startDate": 1540371600000,
"endDate": 1540378800000,
"usedDays": 0,
"usedMinutes": 0
}
}
]Get single vacation document
Returns information about existing vacation document.
Permissions: ADMIN USER SUPERVISOR HR
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document/{issueKey}Responses: 200 400 404 500
Path params
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
issueKey | String | Issue key |
Request
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document/{issueKey}Response
{
"issueId": 10600,
"issueKey": "VACMAN-1",
"reporter": {
"id": 1,
"name": "user",
"displayName": "User",
"active": true
},
"supervisor": {
"id": 2,
"name": "supervisor",
"displayName": "Supervisor",
"active": true
},
"status": "OPEN",
"selectedPeriod": {
"periodType": "DAILY",
"startDateTime": 1540159200000,
"endDateTime": 1540331999999,
"startDate": 1540159200000,
"endDate": 1540331999999,
"usedDays": 0,
"usedMinutes": 0
}
}Get vacation documents waiting for approval
Returns vacation documents waiting for approval
Permissions: ADMIN USER SUPERVISOR HR
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document/waiting-for-approval?reporter={reporter}&supervisor={supervisor}&startDate={startDate}&endDate={endDate}Responses: 200 500
Query params
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
reporter | String | Name of reporter of vacation document |
supervisor | String | Name of supervisor assigned to vacation document |
startDate | String | Date that vacation have to start after. ISO 8601 format. |
endDate | String | Date that vacation have to end before. ISO 8601 format. |
Path
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document/waiting-for-approvalResponse
[
{
"issueId": 10600,
"issueKey": "VACMAN-1",
"reporter": "{
"id": 1,
"name": "user",
"displayName": "User",
"active": true
},
"supervisor": {
"id": 2,
"name": "supervisor",
"displayName": "Supervisor",
"active": true
},
"status": "OPEN",
"selectedPeriod": {
"periodType": "DAILY",
"startDateTime": 1540159200000,
"endDateTime": 1540331999999,
"startDate": 1540159200000,
"endDate": 1540331999999,
"usedDays": 0,
"usedMinutes": 0
}
},
{
"issueId": 10502,
"issueKey": "VACMAN-2",
"reporter": {
"id": 1,
"name": "user",
"displayName": "User",
"active": true
},
"supervisor": {
"id": 2,
"name": "supervisor",
"displayName": "Supervisor",
"active": true
},
"status": "OPEN",
"selectedPeriod": {
"periodType": "HOURLY",
"startDateTime": 1540371600000,
"endDateTime": 1540378800000,
"startDate": 1540371600000,
"endDate": 1540378800000,
"usedDays": 0,
"usedMinutes": 0
}
}
]Get actions for vacation document
Returns available actions that could be executed upon vacation document.
Permissions: ADMIN USER SUPERVISOR HR
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document/{issueKey}/actionsResponses: 200 404 500
Path params
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
issueKey | String | Issue key |
Path
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-document/VACMAN-2/actionsResponse
[
{
"id": 11,
"name": "Approve"
},
{
"id": 21,
"name": "Reject"
},
{
"id": 41,
"name": "More information required"
}
] POST
Create new vacation document
Create and returns new vacation document. It creates new Jira issue.
Permissions: ADMIN USER SUPERVISOR HR
POST {jira_baseurl}/rest/vacation-manager/1.0/vacation-documentResponses: 201 400 500
JSON body fields
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
reporterName | String | Reporter name |
supervisorName | String | Supervisor name |
substituteName | String (Optional) | Substitute name |
description | String (Optional) | Description for created issue |
vacationKindId | Integer | Vacation document is created for vacation kind with this id |
periodType | PeriodType | Period type |
startDate | String (Optional) | Start date of the leave for daily and half-daily requests. ISO 8601 format. |
startDateTime | String (Optional) | Start date time of the leave for hourly requests. ISO 8601 format. |
endDate | String (Optional) | End date of the leave for daily requests. ISO 8601 format. |
halfDayType | HalfDayType (Optional) | Required for half-daily requests. |
endTimeMinutes | Integer (Optional) | Duration of hourly leave in minutes. Required for hourly request |
PeriodType
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
DAILY | Enum | Daily peroid type |
HALF_DAILY | Enum | Half daily period type |
HOURLY | Enum | Hourly period type |
HalfDayType
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
AM | Enum | First half of work day |
PM | Enum | Second half of work day |
Path
POST {jira_baseurl}/rest/vacation-manager/1.0/vacation-documentBody
{
"reporterName": "user",
"supervisorName": "supervisor",
"substituteName": "james",
"vacationKindId": 1,
"periodType": "DAILY",
"startDate": "2018-10-10",
"endDate": "2018-10-12"
}Response
{
"issueId": 10600,
"issueKey": "VACMAN-1",
"reporter": {
"id": 1,
"name": "user",
"displayName": "User",
"active": true
},
"supervisor": {
"id": 2,
"name": "supervisor",
"displayName": "Supervisor",
"active": true
},
"status": "OPEN",
"selectedPeriod": {
"periodType": "DAILY",
"startDateTime": 1540159200000,
"endDateTime": 1540245599999,
"startDate": 1540159200000,
"endDate": 1540245599999,
"usedDays": 0,
"usedMinutes": 0
}
}PUT
Update vacation document
Updates existing vacation document.
Permissions: ADMIN USER SUPERVISOR HR
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacation-documentResponses: 201 400 404 500
JSON body fields
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
reporterName | String | Reporter name |
supervisorName | String | Supervisor name |
substituteName | String (Optional) | Substitute name |
description | String (Optional) | Description for created issue |
vacationKindId | Integer | Vacation document is created for vacation kind with this id |
periodType | PeriodType | Period type |
startDate | String (Optional) | Start date of the leave for daily and half-daily requests. ISO 8601 format. |
startDateTime | String (Optional) | Start date time of the leave for hourly requests. ISO 8601 format. |
endDate | String (Optional) | End date of the leave for daily requests. ISO 8601 format. |
halfDayType | HalfDayType (Optional) | Required for half-daily requests. |
endTimeMinutes | Integer (Optional) | Duration of hourly leave in minutes. Required for hourly request |
PeriodType
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
DAILY | Enum | Daily peroid type |
HALF_DAILY | Enum | Half daily period type |
HOURLY | Enum | Hourly period type |
HalfDayType
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
AM | Enum | First half of work day |
PM | Enum | Second half of work day |
Path
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacation-documentBody
{
"issueKey": "VACMAN-1",
"reporterName": "user",
"supervisorName": "supervisor",
"periodType": "DAILY",
"startDate": "2018-10-22",
"endDate": "2018-10-23"
}Update status of vacation document
Updates status of vacation document.
Permissions: ADMIN USER SUPERVISOR HR
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacation-document/statusResponses: 200 400 404 500
JSON body fields
Name | Type | Description |
|---|
Name | Type | Description |
|---|---|---|
issueKey | String | Key of issue to update status |
actionId | Integer | Id of action to execute on issue in order to make transition. To retrieve available actions, see get actions |
comment | String (optional) | Comment to add upon changing status. Some actions require comments |
Path
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacation-document/statusBody
{
"issueKey": "VACMAN-1",
"actionId": 1,
"comment": "Example comment"
}