[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

https://psc-software.atlassian.net/wiki/spaces/VMSD/pages/297074739

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

https://psc-software.atlassian.net/wiki/spaces/VMSD/pages/296419591

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

Response: STATUS 201

Response

3. Add supervisor to team

User: HR

https://psc-software.atlassian.net/wiki/spaces/VMSD/pages/296419591

Request





Body



4. Add users to team

User: HR

Request





Body



5. Add new holiday

User: HR

5.1. Get list of holiday schemes to obtain id

Request



5.2. Add new holiday

Request



6. Add vacation definition to user

User: HR

Request



7. Create vacation document

User: john jira user

Request



8. Send vacation document to supervisor

User: john jira user

8.1. Get list of actions for vacation document

Request



8.2. Change status of vacation document

Request



9. Approve vacation document

User: supervisor

9.1. Get list of actions for vacation document

Request



9.2. Change status of vacation document

Request





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