Projekt

Obecné

Profil

« Předchozí | Další » 

Revize fe88b83e

Přidáno uživatelem Pavel Fidransky před více než 4 roky(ů)

add API docs

Zobrazit rozdíly:

docs/api.html
1
<!DOCTYPE HTML><html><head><title>YManager API documentation</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="https://github.com/raml2html/raml2html 7.5.0"><link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"><script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script><script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script type="text/javascript">
2
      $(document).ready(function() {
3
  $('.page-header pre code, .top-resource-description pre code, .modal-body pre code').each(function(i, block) {
4
    hljs.highlightBlock(block);
5
  });
6

  
7
  $('[data-toggle]').click(function() {
8
    var selector = $(this).data('target') + ' pre code';
9
    $(selector).each(function(i, block) {
10
      hljs.highlightBlock(block);
11
    });
12
  });
13

  
14
  // open modal on hashes like #_action_get
15
  $(window).bind('hashchange', function(e) {
16
    var anchor_id = document.location.hash.substr(1); //strip #
17
    var element = $('#' + anchor_id);
18

  
19
    // do we have such element + is it a modal?  --> show it
20
    if (element.length && element.hasClass('modal')) {
21
      element.modal('show');
22
    }
23
  });
24

  
25
  // execute hashchange on first page load
26
  $(window).trigger('hashchange');
27

  
28
  // remove url fragment on modal hide
29
  $('.modal').on('hidden.bs.modal', function() {
30
    try {
31
      if (history && history.replaceState) {
32
          history.replaceState({}, '', '#');
33
      }
34
    } catch(e) {}
35
  });
36
});
37
    </script><style>
38
      .hljs {
39
  background: transparent;
40
}
41
.parent {
42
  color: #999;
43
}
44
.list-group-item > .badge {
45
  float: none;
46
  margin-right: 6px;
47
}
48
.panel-title > .methods {
49
  float: right;
50
}
51
.badge {
52
  border-radius: 0;
53
  text-transform: uppercase;
54
  width: 70px;
55
  font-weight: normal;
56
  color: #f3f3f6;
57
  line-height: normal;
58
}
59
.badge_get {
60
  background-color: #63a8e2;
61
}
62
.badge_post {
63
  background-color: #6cbd7d;
64
}
65
.badge_put {
66
  background-color: #22bac4;
67
}
68
.badge_delete {
69
  background-color: #d26460;
70
}
71
.badge_patch {
72
  background-color: #ccc444;
73
}
74
.list-group,
75
.panel-group {
76
  margin-bottom: 0;
77
}
78
.panel-group .panel+.panel-white {
79
  margin-top: 0;
80
}
81
.panel-group .panel-white {
82
  border-bottom: 1px solid #F5F5F5;
83
  border-radius: 0;
84
}
85
.panel-white:last-child {
86
  border-bottom-color: white;
87
  -webkit-box-shadow: none;
88
  box-shadow: none;
89
}
90
.panel-white .panel-heading {
91
  background: white;
92
}
93
.tab-pane ul {
94
  padding-left: 2em;
95
}
96
.tab-pane h1 {
97
  font-size: 1.3em;
98
}
99
.tab-pane h2 {
100
  font-size: 1.2em;
101
  padding-bottom: 4px;
102
  border-bottom: 1px solid #ddd;
103
}
104
.tab-pane h3 {
105
  font-size: 1.1em;
106
}
107
.tab-content {
108
  border-left: 1px solid #ddd;
109
  border-right: 1px solid #ddd;
110
  border-bottom: 1px solid #ddd;
111
  padding: 10px;
112
}
113
#sidebar {
114
  margin-top: 30px;
115
  padding-right: 5px;
116
  overflow: auto;
117
  height: 90%;
118
}
119
.top-resource-description {
120
  border-bottom: 1px solid #ddd;
121
  background: #fcfcfc;
122
  padding: 15px 15px 0 15px;
123
  margin: -15px -15px 10px -15px;
124
}
125
.resource-description {
126
  border-bottom: 1px solid #fcfcfc;
127
  background: #fcfcfc;
128
  padding: 15px 15px 0 15px;
129
  margin: -15px -15px 10px -15px;
130
}
131
.resource-description p:last-child {
132
  margin: 0;
133
}
134
.list-group .badge {
135
  float: left;
136
}
137
.method_description {
138
  margin-left: 85px;
139
}
140
.method_description p:last-child {
141
  margin: 0;
142
}
143
.list-group-item {
144
  cursor: pointer;
145
}
146
.list-group-item:hover {
147
  background-color: #f5f5f5;
148
}
149
pre code {
150
  overflow: auto;
151
  word-wrap: normal;
152
  white-space: pre;
153
}
154
.items {
155
  background: #f5f5f5;
156
  color: #333;
157
  border: 1px solid #ccc;
158
  border-radius: 4px;
159
  padding: 9.5px;
160
  margin: 0 0 10px;
161
  font-size: 13px;
162
  line-height: 1.42857143;
163
}
164
.examples {
165
  margin-left: 0.5em;
166
}
167
.resource-modal li > ul {
168
  margin-bottom: 1em;
169
}
170
.required {
171
  color: #f00;
172
}
173
    </style></head><body data-spy="scroll" data-target="#sidebar"><div class="container"><div class="row"><div class="col-md-9" role="main"><div class="page-header"><h1>YManager API documentation</h1><p></p></div><div class="panel panel-default"><div class="panel-heading"><h3 id="users" class="panel-title">/users</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_users"><span class="parent"></span>/users</a> <span class="methods"><a href="#users_get"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_users" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#users_get'" class="list-group-item"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="users_get"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent"></span>/users</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#users_get_request" data-toggle="tab">Request</a></li><li><a href="#users_get_response" data-toggle="tab">Response</a></li><li><a href="#users_get_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="users_get_request"><h3>Query Parameters</h3><ul><li><strong>status</strong>: <em>(one of ACCEPTED, PENDING, REJECTED)</em></li></ul></div><div class="tab-pane" id="users_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the user&#39;s id</p></li><li><strong>firstName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s first name</p></li><li><strong>lastName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s last name</p></li><li><strong>photo</strong>: <em><span class="required">required</span>(string)</em><p>the URL of a photo</p></li><li><strong>calendar</strong>: <em><span class="required">required</span>(array of VacationDayDTO)</em><p>the list of selected vacation in +-7 days</p><p><strong>Items</strong>: VacationDayDTO</p><div class="items"><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the id of the vacation/sick day</p></li><li><strong>date</strong>: <em><span class="required">required</span>(string)</em><p>the date of the vacation/sick day in yyyy/mm/dd format</p></li><li><strong>from</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the start of the vacation, null for sick days</p></li><li><strong>to</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the end of the vacation, null for sick days</p></li><li><strong>type</strong>: <em><span class="required">required</span>(one of VACATION, SICK_DAY)</em></li><li><strong>status</strong>: <em><span class="required">required</span>(one of ACCEPTED, PENDING, REJECTED)</em></li></ul></div></li></ul><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check query parameters.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="users_get_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_users_requests_vacation"><span class="parent">/users/requests</span>/vacation</a> <span class="methods"><a href="#users_requests_vacation_get"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_users_requests_vacation" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#users_requests_vacation_get'" class="list-group-item"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="users_requests_vacation_get"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/users/requests</span>/vacation</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#users_requests_vacation_get_request" data-toggle="tab">Request</a></li><li><a href="#users_requests_vacation_get_response" data-toggle="tab">Response</a></li><li><a href="#users_requests_vacation_get_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="users_requests_vacation_get_request"><h3>Query Parameters</h3><ul><li><strong>status</strong>: <em>(one of ACCEPTED, PENDING, REJECTED)</em></li></ul></div><div class="tab-pane" id="users_requests_vacation_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: array of object</p><p><strong>Items</strong>: UserVacationRequestDTO</p><div class="items"><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the user&#39;s id</p></li><li><strong>firstName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s first name</p></li><li><strong>lastName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s last name</p></li><li><strong>date</strong>: <em><span class="required">required</span>(string)</em><p>the date of the vacation/sick day in yyyy/mm/dd format</p></li><li><strong>from</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the start of the vacation, null for sick days</p></li><li><strong>to</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the end of the vacation, null for sick days</p></li><li><strong>type</strong>: <em><span class="required">required</span>(one of VACATION, SICK_DAY)</em><p>the approval status of the request</p></li><li><strong>status</strong>: <em><span class="required">required</span>(one of ACCEPTED, PENDING, REJECTED)</em></li><li><strong>timestamp</strong>: <em><span class="required">required</span>(string)</em><p>the creation of the request in yyyy/mm/dd hh:mm:ss format</p></li></ul></div><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check query parameters.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="users_requests_vacation_get_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_users_requests_authorization"><span class="parent">/users/requests</span>/authorization</a> <span class="methods"><a href="#users_requests_authorization_get"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_users_requests_authorization" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#users_requests_authorization_get'" class="list-group-item"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="users_requests_authorization_get"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/users/requests</span>/authorization</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#users_requests_authorization_get_request" data-toggle="tab">Request</a></li><li><a href="#users_requests_authorization_get_response" data-toggle="tab">Response</a></li><li><a href="#users_requests_authorization_get_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="users_requests_authorization_get_request"><h3>Query Parameters</h3><ul><li><strong>status</strong>: <em>(one of ACCEPTED, PENDING, REJECTED)</em></li></ul></div><div class="tab-pane" id="users_requests_authorization_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: array of object</p><p><strong>Items</strong>: UserAuthorizationRequestDTO</p><div class="items"><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the user&#39;s id</p></li><li><strong>firstName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s first name</p></li><li><strong>lastName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s last name</p></li><li><strong>status</strong>: <em><span class="required">required</span>(one of ACCEPTED, PENDING, REJECTED)</em><p>the status of the authorisation</p></li><li><strong>timestamp</strong>: <em><span class="required">required</span>(string)</em><p>the creation of the request in yyyy/mm/dd hh:mm:ss format</p></li></ul></div><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check query parameters.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="users_requests_authorization_get_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_users_current_profile"><span class="parent">/users/current</span>/profile</a> <span class="methods"><a href="#users_current_profile_get"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_users_current_profile" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#users_current_profile_get'" class="list-group-item"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="users_current_profile_get"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/users/current</span>/profile</h4></div><div class="modal-body"><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#users_current_profile_get_response" data-toggle="tab">Response</a></li><li><a href="#users_current_profile_get_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="users_current_profile_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the user&#39;s id</p></li><li><strong>firstName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s first name</p></li><li><strong>lastName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s last name</p></li><li><strong>photo</strong>: <em><span class="required">required</span>(string)</em><p>the URL of a photo</p></li><li><strong>vacationCount</strong>: <em><span class="required">required</span>(number)</em><p>the number of available vacations</p></li><li><strong>sickDayCount</strong>: <em><span class="required">required</span>(integer)</em><p>the number of assigned sick days</p></li><li><strong>takenSickDayCount</strong>: <em><span class="required">required</span>(integer)</em><p>the number of taken sick days</p></li><li><strong>status</strong>: <em><span class="required">required</span>(one of ACCEPTED, PENDING, REJECTED)</em><p>the authorisation status</p></li><li><strong>role</strong>: <em><span class="required">required</span>(one of EMPLOYEE, EMPLOYER)</em><p>the user role</p></li><li><strong>notification</strong>: <em><span class="required">required</span>(string)</em><p>the notification of an incoming reset of remaining vacations and sick days in yyyy/mm/dd hh:mm:ss format</p></li><li><strong>email</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s email address</p></li></ul><p><strong>Example</strong>:</p><div class="examples"><pre><code>{
174
  "id": 4,
175
  "firstName": "Pavel",
176
  "lastName": "Fidransky",
177
  "photo": "https://st2.depositphotos.com/9223672/12056/v/950/depositphotos_120568236-stock-illustration-male-face-avatar-logo-template.jpg",
178
  "vacationCount": 0.0,
179
  "sickDayCount": 5,
180
  "takenSickDayCount": 0,
181
  "status": "ACCEPTED",
182
  "role": "EMPLOYEE",
183
  "notification": "2019/12/01 12:00:00",
184
  "email": "pavel.fidransky@yoso.fi"
185
}
186
</code></pre></div><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="users_current_profile_get_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_users__id__profile"><span class="parent">/users/{id}</span>/profile</a> <span class="methods"><a href="#users__id__profile_get"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_users__id__profile" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#users__id__profile_get'" class="list-group-item"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="users__id__profile_get"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/users/{id}</span>/profile</h4></div><div class="modal-body"><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#users__id__profile_get_request" data-toggle="tab">Request</a></li><li><a href="#users__id__profile_get_response" data-toggle="tab">Response</a></li><li><a href="#users__id__profile_get_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="users__id__profile_get_request"><h3>URI Parameters</h3><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the user&#39;s id</p></li></ul></div><div class="tab-pane" id="users__id__profile_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the user&#39;s id</p></li><li><strong>firstName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s first name</p></li><li><strong>lastName</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s last name</p></li><li><strong>photo</strong>: <em><span class="required">required</span>(string)</em><p>the URL of a photo</p></li><li><strong>vacationCount</strong>: <em><span class="required">required</span>(number)</em><p>the number of available vacations</p></li><li><strong>sickDayCount</strong>: <em><span class="required">required</span>(integer)</em><p>the number of assigned sick days</p></li><li><strong>takenSickDayCount</strong>: <em><span class="required">required</span>(integer)</em><p>the number of taken sick days</p></li><li><strong>status</strong>: <em><span class="required">required</span>(one of ACCEPTED, PENDING, REJECTED)</em><p>the authorisation status</p></li><li><strong>role</strong>: <em><span class="required">required</span>(one of EMPLOYEE, EMPLOYER)</em><p>the user role</p></li><li><strong>notification</strong>: <em><span class="required">required</span>(string)</em><p>the notification of an incoming reset of remaining vacations and sick days in yyyy/mm/dd hh:mm:ss format</p></li><li><strong>email</strong>: <em><span class="required">required</span>(string)</em><p>the user&#39;s email address</p></li></ul><p><strong>Example</strong>:</p><div class="examples"><pre><code>{
187
  "id": 4,
188
  "firstName": "Pavel",
189
  "lastName": "Fidransky",
190
  "photo": "https://st2.depositphotos.com/9223672/12056/v/950/depositphotos_120568236-stock-illustration-male-face-avatar-logo-template.jpg",
191
  "vacationCount": 0.0,
192
  "sickDayCount": 5,
193
  "takenSickDayCount": 0,
194
  "status": "ACCEPTED",
195
  "role": "EMPLOYEE",
196
  "notification": "2019/12/01 12:00:00",
197
  "email": "pavel.fidransky@yoso.fi"
198
}
199
</code></pre></div><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check URI parameters.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/404" target="_blank">404</a></h2><p>User with given ID doesn&#39;t exist.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="users__id__profile_get_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 id="user" class="panel-title">/user</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_user__id__calendar"><span class="parent">/user/{id}</span>/calendar</a> <span class="methods"><a href="#user__id__calendar_get"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_user__id__calendar" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#user__id__calendar_get'" class="list-group-item"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer or calendar owner only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="user__id__calendar_get"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/user/{id}</span>/calendar</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer or calendar owner only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#user__id__calendar_get_request" data-toggle="tab">Request</a></li><li><a href="#user__id__calendar_get_response" data-toggle="tab">Response</a></li><li><a href="#user__id__calendar_get_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="user__id__calendar_get_request"><h3>URI Parameters</h3><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the user&#39;s id</p></li></ul><h3>Query Parameters</h3><ul><li><strong>from</strong>: <em><span class="required">required</span>(string)</em><p>yyyy/mm/dd</p></li><li><strong>to</strong>: <em>(string)</em><p>yyyy/mm/dd</p></li><li><strong>status</strong>: <em>(one of ACCEPTED, PENDING, REJECTED)</em></li></ul></div><div class="tab-pane" id="user__id__calendar_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: array of object</p><p><strong>Items</strong>: VacationDayDTO</p><div class="items"><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the id of the vacation/sick day</p></li><li><strong>date</strong>: <em><span class="required">required</span>(string)</em><p>the date of the vacation/sick day in yyyy/mm/dd format</p></li><li><strong>from</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the start of the vacation, null for sick days</p></li><li><strong>to</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the end of the vacation, null for sick days</p></li><li><strong>type</strong>: <em><span class="required">required</span>(one of VACATION, SICK_DAY)</em></li><li><strong>status</strong>: <em><span class="required">required</span>(one of ACCEPTED, PENDING, REJECTED)</em></li></ul></div><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check query parameters.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/404" target="_blank">404</a></h2><p>User with given ID doesn&#39;t exist.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="user__id__calendar_get_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_user_calendar_create"><span class="parent">/user/calendar</span>/create</a> <span class="methods"><a href="#user_calendar_create_post"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_user_calendar_create" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#user_calendar_create_post'" class="list-group-item"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer or calendar owner only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="user_calendar_create_post"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/user/calendar</span>/create</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer or calendar owner only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#user_calendar_create_post_request" data-toggle="tab">Request</a></li><li><a href="#user_calendar_create_post_response" data-toggle="tab">Response</a></li><li><a href="#user_calendar_create_post_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="user_calendar_create_post_request"><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>date</strong>: <em><span class="required">required</span>(string)</em><p>the date of the vacation/sick day in yyyy/mm/dd format</p></li><li><strong>from</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the start of the vacation, null for sick days</p></li><li><strong>to</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the end of the vacation, null for sick days</p></li><li><strong>type</strong>: <em><span class="required">required</span>(one of VACATION, SICK_DAY)</em></li></ul></div><div class="tab-pane" id="user_calendar_create_post_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check request body.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="user_calendar_create_post_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_user_calendar_edit"><span class="parent">/user/calendar</span>/edit</a> <span class="methods"><a href="#user_calendar_edit_put"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_user_calendar_edit" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#user_calendar_edit_put'" class="list-group-item"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Denied to all.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="user_calendar_edit_put"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/user/calendar</span>/edit</h4></div><div class="modal-body"><div class="alert alert-info"><p>Denied to all.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#user_calendar_edit_put_request" data-toggle="tab">Request</a></li><li><a href="#user_calendar_edit_put_response" data-toggle="tab">Response</a></li><li><a href="#user_calendar_edit_put_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="user_calendar_edit_put_request"><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the id of the vacation/sick day</p></li><li><strong>date</strong>: <em><span class="required">required</span>(string)</em><p>the date of the vacation/sick day in yyyy/mm/dd format</p></li><li><strong>from</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the start of the vacation, null for sick days</p></li><li><strong>to</strong>: <em><span class="required">required</span>(union of string or nil)</em><p>the end of the vacation, null for sick days</p></li></ul></div><div class="tab-pane" id="user_calendar_edit_put_response"><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p></div><div class="tab-pane" id="user_calendar_edit_put_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_user_settings"><span class="parent">/user</span>/settings</a> <span class="methods"><a href="#user_settings_put"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_user_settings" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#user_settings_put'" class="list-group-item"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer or calendar owner only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="user_settings_put"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/user</span>/settings</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer or calendar owner only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#user_settings_put_request" data-toggle="tab">Request</a></li><li><a href="#user_settings_put_response" data-toggle="tab">Response</a></li><li><a href="#user_settings_put_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="user_settings_put_request"><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the user&#39;s ID</p></li><li><strong>vacationCount</strong>: <em><span class="required">required</span>(number)</em><p>the remaining vacations</p></li><li><strong>sickDayCount</strong>: <em><span class="required">required</span>(integer)</em><p>the number of assigned sick days</p></li><li><strong>role</strong>: <em><span class="required">required</span>(one of EMPLOYEE, EMPLOYER)</em><p>the user role</p></li><li><strong>notification</strong>: <em><span class="required">required</span>(string)</em><p>the date and time of sending an email warning about an incoming reset of remaining overtimes and sick days</p></li></ul><p><strong>Example</strong>:</p><div class="examples"><pre><code>{
200
  "id": 4,
201
  "vacationCount": 0.0,
202
  "sickDayCount": 5,
203
  "role": "EMPLOYEE",
204
  "notification": "2019/12/01 12:00:00"
205
}
206
</code></pre></div></div><div class="tab-pane" id="user_settings_put_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check request body.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="user_settings_put_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_user_requests"><span class="parent">/user</span>/requests</a> <span class="methods"><a href="#user_requests_put"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_user_requests" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#user_requests_put'" class="list-group-item"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="user_requests_put"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_put">put <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/user</span>/requests</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#user_requests_put_request" data-toggle="tab">Request</a></li><li><a href="#user_requests_put_response" data-toggle="tab">Response</a></li><li><a href="#user_requests_put_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="user_requests_put_request"><h3>Query Parameters</h3><ul><li><strong>type</strong>: <em><span class="required">required</span>(one of VACATION, AUTHORIZATION)</em></li></ul><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the id of the vacation/sick day</p></li><li><strong>status</strong>: <em><span class="required">required</span>(one of ACCEPTED, PENDING, REJECTED)</em></li></ul></div><div class="tab-pane" id="user_requests_put_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check query parameters and request body.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/404" target="_blank">404</a></h2><p>Neither vacation nor authorization request with given ID exists.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="user_requests_put_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 id="settings" class="panel-title">/settings</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_settings"><span class="parent"></span>/settings</a> <span class="methods"><a href="#settings_get"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a> <a href="#settings_post"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_settings" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#settings_get'" class="list-group-item"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"></div><div class="clearfix"></div></div><div onclick="window.location.href = '#settings_post'" class="list-group-item"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="settings_get"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent"></span>/settings</h4></div><div class="modal-body"><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#settings_get_response" data-toggle="tab">Response</a></li><li><a href="#settings_get_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="settings_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>sickDayCount</strong>: <em><span class="required">required</span>(integer)</em><p>the number of assigned sick days</p></li><li><strong>notification</strong>: <em><span class="required">required</span>(string)</em><p>the notification of an incoming reset of remaining vacations and sick days in yyyy/mm/dd hh:mm:ss format</p></li></ul><p><strong>Example</strong>:</p><div class="examples"><pre><code>{
207
  "sickDayCount": 5,
208
  "notification": "2019/12/01 12:00:00"
209
}
210
</code></pre></div><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="settings_get_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div><div class="modal fade" tabindex="0" id="settings_post"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent"></span>/settings</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#settings_post_request" data-toggle="tab">Request</a></li><li><a href="#settings_post_response" data-toggle="tab">Response</a></li><li><a href="#settings_post_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="settings_post_request"><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: object</p><strong>Properties</strong><ul><li><strong>sickDayCount</strong>: <em><span class="required">required</span>(integer)</em><p>the number of assigned sick days</p></li><li><strong>notification</strong>: <em><span class="required">required</span>(string)</em><p>the notification of an incoming reset of remaining vacations and sick days in yyyy/mm/dd hh:mm:ss format</p></li></ul><p><strong>Example</strong>:</p><div class="examples"><pre><code>{
211
  "sickDayCount": 5,
212
  "notification": "2019/12/01 12:00:00"
213
}
214
</code></pre></div></div><div class="tab-pane" id="settings_post_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="settings_post_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 id="calendar" class="panel-title">/calendar</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_calendar__id__delete"><span class="parent">/calendar/{id}</span>/delete</a> <span class="methods"><a href="#calendar__id__delete_delete"><span class="badge badge_delete">delete <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_calendar__id__delete" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#calendar__id__delete_delete'" class="list-group-item"><span class="badge badge_delete">delete <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"><p>Employer or vacation owner only.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="calendar__id__delete_delete"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_delete">delete <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/calendar/{id}</span>/delete</h4></div><div class="modal-body"><div class="alert alert-info"><p>Employer or vacation owner only.</p></div><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#calendar__id__delete_delete_request" data-toggle="tab">Request</a></li><li><a href="#calendar__id__delete_delete_response" data-toggle="tab">Response</a></li><li><a href="#calendar__id__delete_delete_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="calendar__id__delete_delete_request"><h3>URI Parameters</h3><ul><li><strong>id</strong>: <em><span class="required">required</span>(integer)</em><p>the calendar&#39;s id</p></li></ul></div><div class="tab-pane" id="calendar__id__delete_delete_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p><h2>HTTP status code <a href="http://httpstatus.es/400" target="_blank">400</a></h2><p>Bad request. Check URI parameters and request body.</p><h2>HTTP status code <a href="http://httpstatus.es/401" target="_blank">401</a></h2><p>Not authenticated.</p><h2>HTTP status code <a href="http://httpstatus.es/403" target="_blank">403</a></h2><p>Not authorized.</p><h2>HTTP status code <a href="http://httpstatus.es/404" target="_blank">404</a></h2><p>Vacation with given ID doesn&#39;t exist.</p><h2>HTTP status code <a href="http://httpstatus.es/500" target="_blank">500</a></h2><p>Internal server error.</p></div><div class="tab-pane" id="calendar__id__delete_delete_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 id="import" class="panel-title">/import</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_import_xls"><span class="parent">/import</span>/xls</a> <span class="methods"><a href="#import_xls_post"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_import_xls" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#import_xls_post'" class="list-group-item"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="import_xls_post"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_post">post <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/import</span>/xls</h4></div><div class="modal-body"><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#import_xls_post_request" data-toggle="tab">Request</a></li><li><a href="#import_xls_post_response" data-toggle="tab">Response</a></li><li><a href="#import_xls_post_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="import_xls_post_request"><h3>Body</h3><p><strong>Media type</strong>: application/json</p><p><strong>Type</strong>: file</p></div><div class="tab-pane" id="import_xls_post_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p></div><div class="tab-pane" id="import_xls_post_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 id="export" class="panel-title">/export</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white resource-modal"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_export_pdf"><span class="parent">/export</span>/pdf</a> <span class="methods"><a href="#export_pdf_get"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span></a></span></h4></div><div id="panel_export_pdf" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#export_pdf_get'" class="list-group-item"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span><div class="method_description"></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="export_pdf_get"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get <span class="glyphicon glyphicon-lock" title="Authentication required"></span></span> <span class="parent">/export</span>/pdf</h4></div><div class="modal-body"><div class="alert alert-warning"><span class="glyphicon glyphicon-lock" title="Authentication required"></span> Secured by <b>oauth_2_0</b><p>Accessible with OAuth2 authentication token.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#export_pdf_get_response" data-toggle="tab">Response</a></li><li><a href="#export_pdf_get_securedby" data-toggle="tab">Security</a></li></ul><div class="tab-content"><div class="tab-pane active" id="export_pdf_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><p>OK.</p></div><div class="tab-pane" id="export_pdf_get_securedby"><h1>Secured by oauth_2_0</h1></div></div></div></div></div></div></div></div></div></div></div><div class="col-md-3"><div id="sidebar" class="hidden-print affix" role="complementary"><ul class="nav nav-pills nav-stacked"><li><a href="#users">/users</a></li><li><a href="#user">/user</a></li><li><a href="#settings">/settings</a></li><li><a href="#calendar">/calendar</a></li><li><a href="#import">/import</a></li><li><a href="#export">/export</a></li></ul></div></div></div></div></body></html>
docs/api.yaml
1
#%RAML 1.0
2
title: YManager
3
mediaType: application/json
4
securedBy: [oauth_2_0]
5

  
6
securitySchemes:
7
  oauth_2_0:
8
    description: Accessible with OAuth2 authentication token.
9
    type: OAuth 2.0
10

  
11
types:
12
  UserDTO:
13
    type: object
14
    properties:
15
      id:
16
        type: integer
17
        description: the user's id
18
      firstName:
19
        type: string
20
        description:  the user's first name
21
      lastName:
22
        type: string
23
        description: the user's last name
24
      photo:
25
        type: string
26
        description: the URL of a photo
27
      calendar:
28
        type: VacationDayDTO[]
29
        description: the list of selected vacation in +-7 days
30
  CreateVacationDayDTO:
31
    type: object
32
    properties:
33
      date:
34
        type: string
35
        description: the date of the vacation/sick day in yyyy/mm/dd format
36
      from:
37
        type: string | nil
38
        description: the start of the vacation, null for sick days
39
      to:
40
        type: string | nil
41
        description: the end of the vacation, null for sick days
42
      type:
43
        type: string
44
        enum: [VACATION, SICK_DAY]
45
  VacationDayDTO:
46
    type: object
47
    properties:
48
      id:
49
        type: integer
50
        description: the id of the vacation/sick day
51
      date:
52
        type: string
53
        description: the date of the vacation/sick day in yyyy/mm/dd format
54
      from:
55
        type: string | nil
56
        description: the start of the vacation, null for sick days
57
      to:
58
        type: string | nil
59
        description: the end of the vacation, null for sick days
60
      type:
61
        type: string
62
        enum: [VACATION, SICK_DAY]
63
      status:
64
        type: string
65
        enum: [ACCEPTED, PENDING, REJECTED]
66
  BasicRequestDTO:
67
    type: object
68
    properties:
69
      id:
70
        type: integer
71
        description: the id of the vacation/sick day
72
      status:
73
        type: string
74
        enum: [ACCEPTED, PENDING, REJECTED]
75
  UserVacationRequestDTO:
76
    type: object
77
    properties:
78
      id:
79
        type: integer
80
        description: the user's id
81
      firstName:
82
        type: string
83
        description:  the user's first name
84
      lastName:
85
        type: string
86
        description: the user's last name
87
      date:
88
        type: string
89
        description: the date of the vacation/sick day in yyyy/mm/dd format
90
      from:
91
        type: string | nil
92
        description: the start of the vacation, null for sick days
93
      to:
94
        type: string | nil
95
        description: the end of the vacation, null for sick days
96
      type:
97
        type: string
98
        enum: [VACATION, SICK_DAY]
99
        description: the approval status of the request
100
      status:
101
        type: string
102
        enum: [ACCEPTED, PENDING, REJECTED]
103
      timestamp:
104
        type: string
105
        description: the creation of the request in yyyy/mm/dd hh:mm:ss format
106
  UserAuthorizationRequestDTO:
107
    type: object
108
    properties:
109
      id:
110
        type: integer
111
        description: the user's id
112
      firstName:
113
        type: string
114
        description:  the user's first name
115
      lastName:
116
        type: string
117
        description: the user's last name
118
      status:
119
        type: string
120
        enum: [ACCEPTED, PENDING, REJECTED]
121
        description: the status of the authorisation
122
      timestamp:
123
        type: string
124
        description: the creation of the request in yyyy/mm/dd hh:mm:ss format
125
  FullUserDTO:
126
    type: object
127
    properties:
128
      id:
129
        type: integer
130
        description: the user's id
131
      firstName:
132
        type: string
133
        description:  the user's first name
134
      lastName:
135
        type: string
136
        description: the user's last name
137
      photo:
138
        type: string
139
        description: the URL of a photo
140
      vacationCount:
141
        type: number
142
        description: the number of available vacations
143
      sickDayCount:
144
        type: integer
145
        description: the number of assigned sick days
146
      takenSickDayCount:
147
        type: integer
148
        description: the number of taken sick days
149
      status:
150
        type: string
151
        enum: [ACCEPTED, PENDING, REJECTED]
152
        description: the authorisation status
153
      role:
154
        type: string
155
        enum: [EMPLOYEE, EMPLOYER]
156
        description: the user role
157
      notification:
158
        type: string
159
        description:  the notification of an incoming reset of remaining vacations and sick days in yyyy/mm/dd hh:mm:ss format
160
      email:
161
        type: string
162
        description: the user's email address
163
    example: |
164
      {
165
        "id": 4,
166
        "firstName": "Pavel",
167
        "lastName": "Fidransky",
168
        "photo": "https://st2.depositphotos.com/9223672/12056/v/950/depositphotos_120568236-stock-illustration-male-face-avatar-logo-template.jpg",
169
        "vacationCount": 0.0,
170
        "sickDayCount": 5,
171
        "takenSickDayCount": 0,
172
        "status": "ACCEPTED",
173
        "role": "EMPLOYEE",
174
        "notification": "2019/12/01 12:00:00",
175
        "email": "pavel.fidransky@yoso.fi"
176
      }
177
  SettingsDTO:
178
    type: object
179
    properties:
180
      sickDayCount:
181
        type: integer
182
        description: the number of assigned sick days
183
      notification:
184
        type: string
185
        description: the notification of an incoming reset of remaining vacations and sick days in yyyy/mm/dd hh:mm:ss format
186
    example: |
187
      {
188
        "sickDayCount": 5,
189
        "notification": "2019/12/01 12:00:00"
190
      }
191
  UserSettingsDTO:
192
    type: object
193
    properties:
194
      id:
195
        type: integer
196
        description: the user's ID
197
      vacationCount:
198
        type: number
199
        description: the remaining vacations
200
      sickDayCount:
201
        type: integer
202
        description: the number of assigned sick days
203
      role:
204
        type: string
205
        enum: [EMPLOYEE, EMPLOYER]
206
        description: the user role
207
      notification:
208
        type: string
209
        description: the date and time of sending an email warning about an incoming reset of remaining overtimes and sick days
210
    example: |
211
      {
212
        "id": 4,
213
        "vacationCount": 0.0,
214
        "sickDayCount": 5,
215
        "role": "EMPLOYEE",
216
        "notification": "2019/12/01 12:00:00"
217
      }
218
  CalendarDTO:
219
    type: object
220
    properties:
221
      id:
222
        type: integer
223
        description: the id of the vacation/sick day
224
      date:
225
        type: string
226
        description: the date of the vacation/sick day in yyyy/mm/dd format
227
      from:
228
        type: string | nil
229
        description: the start of the vacation, null for sick days
230
      to:
231
        type: string | nil
232
        description: the end of the vacation, null for sick days
233

  
234
/users:
235
  get:
236
    description: Employer only.
237
    queryParameters:
238
      status:
239
        type: string
240
        enum: [ACCEPTED, PENDING, REJECTED]
241
        required: false
242
    responses:
243
      200:
244
        description: OK.
245
        body: UserDTO
246
      400:
247
        description: Bad request. Check query parameters.
248
      401:
249
        description: Not authenticated.
250
      403:
251
        description: Not authorized.
252
      500:
253
        description: Internal server error.
254
  /requests:
255
    /vacation:
256
      get:
257
        description: Employer only.
258
        queryParameters:
259
          status:
260
            type: string
261
            enum: [ACCEPTED, PENDING, REJECTED]
262
            required: false
263
        responses:
264
          200:
265
            description: OK.
266
            body: UserVacationRequestDTO[]
267
          400:
268
            description: Bad request. Check query parameters.
269
          401:
270
            description: Not authenticated.
271
          403:
272
            description: Not authorized.
273
          500:
274
            description: Internal server error.
275
    /authorization:
276
      get:
277
        description: Employer only.
278
        queryParameters:
279
          status:
280
            type: string
281
            enum: [ACCEPTED, PENDING, REJECTED]
282
            required: false
283
        responses:
284
          200:
285
            description: OK.
286
            body: UserAuthorizationRequestDTO[]
287
          400:
288
            description: Bad request. Check query parameters.
289
          401:
290
            description: Not authenticated.
291
          403:
292
            description: Not authorized.
293
          500:
294
            description: Internal server error.
295
  /current:
296
    /profile:
297
      get:
298
        responses:
299
          200:
300
            description: OK.
301
            body: FullUserDTO
302
          401:
303
            description: Not authenticated.
304
          500:
305
            description: Internal server error.
306
  /{id}:
307
    uriParameters:
308
      id:
309
        type: integer
310
        description: the user's id
311
    /profile:
312
      get:
313
        responses:
314
          200:
315
            description: OK.
316
            body: FullUserDTO
317
          400:
318
            description: Bad request. Check URI parameters.
319
          401:
320
            description: Not authenticated.
321
          403:
322
            description: Not authorized.
323
          404:
324
            description: User with given ID doesn't exist.
325
          500:
326
            description: Internal server error.
327
/user:
328
  /{id}:
329
    uriParameters:
330
      id:
331
        type: integer
332
        description: the user's id
333
    /calendar:
334
      get:
335
        description: Employer or calendar owner only.
336
        queryParameters:
337
          from:
338
            type: string
339
            description: yyyy/mm/dd
340
            required: true
341
          to:
342
            type: string
343
            description: yyyy/mm/dd
344
            required: false
345
          status:
346
            type: string
347
            enum: [ACCEPTED, PENDING, REJECTED]
348
            required: false
349
        responses:
350
          200:
351
            description: OK.
352
            body: VacationDayDTO[]
353
          400:
354
            description: Bad request. Check query parameters.
355
          401:
356
            description: Not authenticated.
357
          403:
358
            description: Not authorized.
359
          404:
360
            description: User with given ID doesn't exist.
361
          500:
362
            description: Internal server error.
363

  
364
  /calendar:
365
    /create:
366
      post:
367
        description: Employer or calendar owner only.
368
        body: CreateVacationDayDTO
369
        responses:
370
          200:
371
            description: OK.
372
          400:
373
            description: Bad request. Check request body.
374
          401:
375
            description: Not authenticated.
376
          403:
377
            description: Not authorized.
378
          500:
379
            description: Internal server error.
380
    /edit:
381
      put:
382
        description: Denied to all.
383
        body: CalendarDTO
384
        responses:
385
          403:
386
            description: Not authorized.
387
  /settings:
388
    put:
389
      description: Employer or calendar owner only.
390
      body: UserSettingsDTO
391
      responses:
392
        200:
393
          description: OK.
394
        400:
395
          description: Bad request. Check request body.
396
        401:
397
          description: Not authenticated.
398
        403:
399
          description: Not authorized.
400
        500:
401
          description: Internal server error.
402
  /requests:
403
    put:
404
      description: Employer only.
405
      queryParameters:
406
        type:
407
          type: string
408
          enum: [VACATION, AUTHORIZATION]
409
          required: true
410
      body: BasicRequestDTO
411
      responses:
412
        200:
413
          description: OK.
414
        400:
415
          description: Bad request. Check query parameters and request body.
416
        401:
417
          description: Not authenticated.
418
        403:
419
          description: Not authorized.
420
        404:
421
          description: Neither vacation nor authorization request with given ID exists.
422
        500:
423
          description: Internal server error.
424

  
425
/settings:
426
  get:
427
    responses:
428
      200:
429
        description: OK.
430
        body: SettingsDTO
431
      500:
432
        description: Internal server error.
433
  post:
434
    description: Employer only.
435
    body: SettingsDTO
436
    responses:
437
      200:
438
        description: OK.
439
      401:
440
        description: Not authenticated.
441
      403:
442
        description: Not authorized.
443
      500:
444
        description: Internal server error.
445

  
446
/calendar:
447
  /{id}:
448
    uriParameters:
449
      id:
450
        type: integer
451
        description: the calendar's id
452
    /delete:
453
      delete:
454
        description: Employer or vacation owner only.
455
        responses:
456
          200:
457
            description: OK.
458
          400:
459
            description: Bad request. Check URI parameters and request body.
460
          401:
461
            description: Not authenticated.
462
          403:
463
            description: Not authorized.
464
          404:
465
            description: Vacation with given ID doesn't exist.
466
          500:
467
            description: Internal server error.
468

  
469
/import:
470
  /xls:
471
    post:
472
      body:
473
        type: file
474
      responses:
475
        200:
476
          description: OK.
477

  
478
/export:
479
  /pdf:
480
    get:
481
      responses:
482
        200:
483
          description: OK.

Také k dispozici: Unified diff