1 |
6b3c455c
|
hlavja
|
openapi: 3.0.1
|
2 |
|
|
info:
|
3 |
|
|
title: SensLog
|
4 |
|
|
description: 'ASWI semestral project of CodeBakers.'
|
5 |
|
|
version: 1.0.0
|
6 |
|
|
externalDocs:
|
7 |
|
|
description: Find out more about Swagger
|
8 |
|
|
url: http://swagger.io
|
9 |
|
|
servers:
|
10 |
f8b9a3a2
|
hlavja
|
- url: http://localhost:4200
|
11 |
|
|
|
12 |
6b3c455c
|
hlavja
|
tags:
|
13 |
|
|
- name: login
|
14 |
|
|
description: Login process
|
15 |
|
|
externalDocs:
|
16 |
|
|
description: Find out more
|
17 |
|
|
url: https://www.senslog.org/api/v1/
|
18 |
|
|
- name: group
|
19 |
|
|
description: Groups endpoints
|
20 |
1d6ec56f
|
hlavja
|
- name: data
|
21 |
|
|
description: Data endpoints
|
22 |
|
|
|
23 |
6b3c455c
|
hlavja
|
paths:
|
24 |
f8b9a3a2
|
hlavja
|
/senslog1/ControllerServlet:
|
25 |
6b3c455c
|
hlavja
|
post:
|
26 |
|
|
tags:
|
27 |
|
|
- login
|
28 |
|
|
summary: Authorize login
|
29 |
|
|
operationId: login
|
30 |
f8b9a3a2
|
hlavja
|
parameters:
|
31 |
6b3c455c
|
hlavja
|
- in: query
|
32 |
f8b9a3a2
|
hlavja
|
name: username
|
33 |
6b3c455c
|
hlavja
|
schema:
|
34 |
|
|
type: string
|
35 |
|
|
description: User login
|
36 |
|
|
- in: query
|
37 |
|
|
name: password
|
38 |
|
|
schema:
|
39 |
|
|
type: string
|
40 |
|
|
description: User password
|
41 |
|
|
responses:
|
42 |
|
|
200:
|
43 |
|
|
description: successful operation
|
44 |
|
|
content:
|
45 |
|
|
application/json:
|
46 |
|
|
schema:
|
47 |
f8b9a3a2
|
hlavja
|
$ref: '#/components/schemas/UserInfo'
|
48 |
|
|
|
49 |
|
|
/senslog1/GroupService:
|
50 |
6b3c455c
|
hlavja
|
get:
|
51 |
|
|
tags:
|
52 |
|
|
- group
|
53 |
|
|
summary: Get groups
|
54 |
|
|
operationId: getGroups
|
55 |
|
|
parameters:
|
56 |
|
|
- in: query
|
57 |
f8b9a3a2
|
hlavja
|
name: Operation
|
58 |
6b3c455c
|
hlavja
|
required: true
|
59 |
|
|
schema:
|
60 |
|
|
type: string
|
61 |
|
|
default: GetGroups
|
62 |
|
|
enum:
|
63 |
|
|
- GetGroups
|
64 |
|
|
- GetSuperGroups
|
65 |
|
|
- GetSubGroups
|
66 |
|
|
description: Group operation
|
67 |
|
|
- in: query
|
68 |
|
|
name: parent_group
|
69 |
|
|
schema:
|
70 |
|
|
type: integer
|
71 |
|
|
responses:
|
72 |
|
|
200:
|
73 |
|
|
description: successful operation
|
74 |
|
|
content:
|
75 |
|
|
application/json:
|
76 |
|
|
schema:
|
77 |
|
|
type: array
|
78 |
|
|
items:
|
79 |
|
|
$ref: '#/components/schemas/Group'
|
80 |
f8b9a3a2
|
hlavja
|
|
81 |
1d6ec56f
|
hlavja
|
/senslog1/DataService?Operation=GetUnits:
|
82 |
|
|
get:
|
83 |
|
|
tags:
|
84 |
|
|
- data
|
85 |
|
|
summary: Get data
|
86 |
|
|
operationId: getData
|
87 |
|
|
responses:
|
88 |
|
|
200:
|
89 |
|
|
description: successful operation
|
90 |
|
|
content:
|
91 |
|
|
application/json:
|
92 |
|
|
schema:
|
93 |
|
|
type: array
|
94 |
|
|
items:
|
95 |
|
|
oneOf:
|
96 |
|
|
- type: object
|
97 |
|
|
properties:
|
98 |
|
|
drivers:
|
99 |
|
|
$ref: '#/components/schemas/Drivers'
|
100 |
|
|
generalInfo:
|
101 |
|
|
$ref: '#/components/schemas/GeneralInfo'
|
102 |
|
|
holder:
|
103 |
|
|
nullable: true
|
104 |
|
|
lastpos:
|
105 |
|
|
$ref: '#/components/schemas/Lastpos'
|
106 |
|
|
sensors:
|
107 |
|
|
type: array
|
108 |
|
|
items:
|
109 |
|
|
$ref: '#/components/schemas/Sensor'
|
110 |
|
|
unit:
|
111 |
|
|
$ref: '#/components/schemas/Unit'
|
112 |
|
|
|
113 |
6b3c455c
|
hlavja
|
components:
|
114 |
|
|
schemas:
|
115 |
f8b9a3a2
|
hlavja
|
UserInfo:
|
116 |
6b3c455c
|
hlavja
|
type: object
|
117 |
|
|
properties:
|
118 |
|
|
sessionid:
|
119 |
|
|
type: string
|
120 |
|
|
language:
|
121 |
|
|
type: string
|
122 |
|
|
audio:
|
123 |
|
|
type: boolean
|
124 |
1d6ec56f
|
hlavja
|
rights:
|
125 |
|
|
type: integer
|
126 |
f8b9a3a2
|
hlavja
|
|
127 |
6b3c455c
|
hlavja
|
Group:
|
128 |
|
|
type: object
|
129 |
|
|
properties:
|
130 |
|
|
id:
|
131 |
|
|
type: integer
|
132 |
|
|
parent_group_id:
|
133 |
|
|
type: integer
|
134 |
|
|
group_name:
|
135 |
|
|
type: string
|
136 |
|
|
has_children:
|
137 |
|
|
type: boolean
|
138 |
1d6ec56f
|
hlavja
|
|
139 |
|
|
Unit:
|
140 |
|
|
type: object
|
141 |
|
|
properties:
|
142 |
|
|
description:
|
143 |
|
|
type: string
|
144 |
|
|
holderId:
|
145 |
|
|
type: integer
|
146 |
|
|
unitId:
|
147 |
|
|
type: integer
|
148 |
|
|
|
149 |
|
|
Phenomenon:
|
150 |
|
|
type: object
|
151 |
|
|
properties:
|
152 |
|
|
phenomenonId:
|
153 |
|
|
type: string
|
154 |
|
|
phenomenonName:
|
155 |
|
|
type: string
|
156 |
|
|
unit:
|
157 |
|
|
type: string
|
158 |
|
|
|
159 |
|
|
Sensor:
|
160 |
|
|
type: object
|
161 |
|
|
properties:
|
162 |
|
|
firstObservationTime:
|
163 |
|
|
type: string
|
164 |
|
|
format: date-time
|
165 |
|
|
lastObservationTime:
|
166 |
|
|
type: string
|
167 |
|
|
format: date-time
|
168 |
|
|
phenomenon:
|
169 |
|
|
$ref: '#/components/schemas/Phenomenon'
|
170 |
|
|
sensorId:
|
171 |
|
|
type: integer
|
172 |
|
|
sensorName:
|
173 |
|
|
type: string
|
174 |
|
|
sensorType:
|
175 |
|
|
type: string
|
176 |
|
|
|
177 |
|
|
Position:
|
178 |
|
|
type: object
|
179 |
|
|
properties:
|
180 |
|
|
SRID:
|
181 |
|
|
type: string
|
182 |
|
|
gid:
|
183 |
|
|
type: integer
|
184 |
|
|
group_id:
|
185 |
|
|
type: integer
|
186 |
|
|
postgisGeomString:
|
187 |
|
|
type: string
|
188 |
|
|
postgisString:
|
189 |
|
|
type: string
|
190 |
|
|
speed:
|
191 |
|
|
type: integer
|
192 |
|
|
time_stamp:
|
193 |
|
|
type: string
|
194 |
|
|
format: date-time
|
195 |
|
|
unit_id:
|
196 |
|
|
type: integer
|
197 |
|
|
x:
|
198 |
|
|
type: number
|
199 |
|
|
y:
|
200 |
|
|
type: number
|
201 |
|
|
|
202 |
|
|
Attributes:
|
203 |
|
|
type: object
|
204 |
|
|
properties:
|
205 |
|
|
is_online:
|
206 |
|
|
type: boolean
|
207 |
|
|
is_moving:
|
208 |
|
|
type: boolean
|
209 |
|
|
#TODO
|
210 |
|
|
AlertEvents:
|
211 |
|
|
type: array
|
212 |
|
|
|
213 |
|
|
Lastpos:
|
214 |
|
|
type: object
|
215 |
|
|
properties:
|
216 |
|
|
alertEvents:
|
217 |
|
|
$ref: '#/components/schemas/AlertEvents'
|
218 |
|
|
attributes:
|
219 |
|
|
$ref: '#/components/schemas/Attributes'
|
220 |
|
|
position:
|
221 |
|
|
$ref: '#/components/schemas/Position'
|
222 |
|
|
#TODO
|
223 |
|
|
GeneralInfo:
|
224 |
|
|
type: array
|
225 |
|
|
#TODO
|
226 |
|
|
Drivers:
|
227 |
|
|
type: array
|