[REST 1.1] REST API usage example in VacMan flow

This page provides example of Vacation Manager REST API usage.

1. Do initial setup of Vacation Manager

User: jira administrator

[REST 1.1] Initial setup

Request
POST {jira_baseurl}/rest/vacation-manager/1.0/initial-setup
Body
{ "project": { "name": "Vacation Manager", "key": "VACMAN", "description": "Vacation project", "lead": "admin", "groupHr": "vacman-hr" }, "vacationType": { "name": "Leave", "description": "Standard leave", "kindType": "RECURRING", "periodDefinition": { "type": "MONTHS", "value": 12, "startDate": "2018-01-01" }, "hasCarryOver": true, "defaultDayLimit": 20, "vacationDocumentPeriodType": "DAILY_OR_HALF_DAILY" } }

2. Create first team

User: HR

[REST 1.1] Teams

Request
POST {jira_baseurl}/rest/vacation-manager/1.0/team
Body

Response: STATUS 201

Response

3. Add supervisor to team

User: HR

[REST 1.1] Teams

Request





Body



4. Add users to team

User: HR

[REST 1.1] Teams

Request





Body



5. Add new holiday

User: HR

5.1. Get list of holiday schemes to obtain id

[REST 1.1] Holiday schemes

Request



5.2. Add new holiday

[REST 1.1] Holiday schemes

Request



6. Add vacation definition to user

User: HR

[REST 1.1] Vacation definitions

Request



7. Create vacation document

User: john jira user

[REST 1.1] Vacation documents

Request



8. Send vacation document to supervisor

User: john jira user

8.1. Get list of actions for vacation document

[REST 1.1] Vacation documents

Request



8.2. Change status of vacation document

[REST 1.1] Vacation documents

Request



9. Approve vacation document

User: supervisor

9.1. Get list of actions for vacation document

[REST 1.1] Vacation documents

Request



9.2. Change status of vacation document

[REST 1.1] Vacation documents

Request





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