Overview
Vacation Manager's REST API provides team API which allows you to obtain:
- create vacation definition
- get vacation definition for user
- update vacation definition
- delete vacation definition
Methods
GET
...
Table of Contents | ||||
---|---|---|---|---|
|
GET
Get vacation definition
Returns all vacation definitions for current user or only selected one vacation definition.
...
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition/user/{userName}?vacationTypeId={vacationTypeId}Permissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |||
---|---|---|---|
|
...
|
Path params
Name | Type | Description |
---|---|---|
userName | String | User name |
Query params
Name | Type | Description |
---|---|---|
vacationTypeId | int | Vacation type Id |
Status | colour | Green|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Expand | ||||||||||
| 200 | status
Status | ||||
---|---|---|---|---|
|
colour | Yellow |
---|---|
title | 400 |
Example |
Path
| ||
Code Block | title | Path|
---|---|---|
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition/user/userName |
Response
Code Block | title | Response
---|
...
Expand | ||
---|---|---|
| ||
Creates and returns vacation definition. Path
|
POST
...
|
Get vacation definition with given ID
Returns vacation definition with given ID
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition/{vacationDefinitionId} |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Path params
Name | Type | Description |
---|---|---|
vacationDefinitionId | int | Vacation definition ID |
Expand | ||||
---|---|---|---|---|
| ||||
Path
Response
|
Get vacation instances for vacation definition
Returns list of vacation instances for given vacation definition,
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
GET {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition/{vacationDefinitionId}/vacation-instance |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Path params
Name | Type | Description |
---|---|---|
vacationDefinitionId | int | Vacation definition ID |
Expand | ||||
---|---|---|---|---|
| ||||
Path
Response
|
...
POST
Create vacation definition
Creates and returns vacation definition.
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
POST {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
JSON body fields
Name | Type | Description |
---|---|---|
vacationTypeId | Integer | vacation type id |
userName | String | username to which dew vacation definition will be assigned |
startDate | String | Date when user is enabled to request vacation using this definition. ISO 8601 format. |
endDate | String | Date when one time vacation type no longer enables user to request vacation using it. Must be used only when vacation has valid through option enabled. |
...
ISO 8601 format. | ||
dayLimit | Double | Default day limit. Should be integer when vacation is "daily only" or "daily or hourly". May contain additional half if vacation is "daily or half daily" |
Status | ||||
---|---|---|---|---|
|
title |
---|
Status | ||||
---|---|---|---|---|
|
Example |
Path
Code Block | ||
---|---|---|
|
Body
Code Block | |
---|---|
Body |
Response
Code Block | |
---|---|
Response |
...
PUT
...
Update vacation definition
Returns and updates vacation definition.
...
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition/{vacationDefinitionId} Permissions |
Responses:
Status | |||
---|---|---|---|
|
...
|
Status | |
---|---|
|
...
|
...
|
Status | |||
---|---|---|---|
|
...
Status | ||||
---|---|---|---|---|
|
|
Path params
Name | Type | Description |
---|---|---|
vacationDefinitionId | int | Vacation definition ID |
JSON body fields
Name | Type | Description |
---|---|---|
dayLimit | double | Day limit |
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Example
title | Example |
---|
title | Path |
---|
title | Example |
---|
Path
Code Block |
---|
PUT {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition/2 |
Body
Code Block | title | Body
---|
{
"dayLimit": 2
} |
Response
Code Block | |
---|---|
Response |
...
DELETE
...
...
Delete vacation definition
Deletes vacation definition.
...
Path
...
...
delete {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition/{vacationDefinitionId}
...
Permissions:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Name | Type | Description |
---|---|---|
vacationDefinitionId | int | Vacation definition ID |
Code Block | ||
delete {jira_baseurl}/rest/vacation-manager/1.0/vacation-definition/{vacationDefinitionId} |
Responses:
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
...
Path params
Name | Type | Description |
---|---|---|
vacationDefinitionId | int | Vacation definition ID |
Expand | ||||
---|---|---|---|---|
| ||||
Path
|