This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.json
433 lines (433 loc) · 13.3 KB
/
swagger.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
{
"openapi" : "3.0.0",
"info" : {
"title" : "sftX API",
"description" : "API to describe connection between storyboard and the SpatioTemporal Feature eXtractor (stfX) server.",
"license" : {
"name" : "Apache 2.0",
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version" : "2.1.1"
},
"servers" : [ {
"url" : "http://fctmost.inesctec.pt:0080/stfx",
"description" : "Interactive Storytelling"
} ],
"tags" : [ {
"name" : "storyboard",
"description" : "Operations for managing the storyboard"
} ],
"paths" : {
"/storyboard" : {
"post" : {
"tags" : [ "storyboard" ],
"summary" : "Load the dataset and respective metadata to the server",
"description" : "Load the spatiotemporal dataset to the server, so that the analysis between snapshots can be done.",
"operationId" : "createStoryboard",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Dataset"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "uuid of the stored dataset",
"content" : {
"application/json" : {
"schema" : {
"type" : "number",
"example" : 1
}
}
}
},
"400" : {
"description" : "Missing information in the performed request"
}
}
}
},
"/storyboard/file" : {
"post" : {
"tags" : [ "storyboard" ],
"summary" : "Load the dataset and respective metadata to the server, using a json file",
"description" : "Load the spatiotemporal dataset to the server, from a json file, so that the analysis between snapshots can be done.",
"operationId" : "createStoryboardFromFile",
"requestBody" : {
"content" : {
"multipart/form-data" : {
"schema" : {
"$ref" : "#/components/schemas/body"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "uuid of the stored dataset",
"content" : {
"application/json" : {
"schema" : {
"type" : "number",
"example" : 1
}
}
}
},
"400" : {
"description" : "Missing information in the performed request"
}
}
}
},
"/storyboard/metadata/{id}" : {
"get" : {
"tags" : [ "metadata" ],
"summary" : "Get this storbyoard's dataset metadata",
"description" : "Get the dataset metadata used in the creation of this storyboard",
"operationId" : "getMetadata",
"parameters" : [ {
"name" : "id",
"in" : "path",
"description" : "The id of the dataset, returned in its creation",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "number",
"example" : 1
}
} ],
"responses" : {
"200" : {
"description" : "The dataset metadata",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/DatasetMetadata"
}
}
}
},
"404" : {
"description" : "Could not find storyboard {id}"
}
}
}
},
"/storyboard/{id}" : {
"post" : {
"tags" : [ "storyboard" ],
"summary" : "Get storyboard frames",
"description" : "By passing user settings, get the events of interest, in a storyboard manner",
"operationId" : "getEventsOfInterest",
"parameters" : [ {
"name" : "id",
"in" : "path",
"description" : "The id of the dataset, returned in its creation",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "number",
"example" : 1
}
}, {
"name" : "initialTimestamp",
"in" : "query",
"description" : "The initial timestamp used in the parsing of the events of interest.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "number",
"example" : 100
}
}, {
"name" : "finalTimestamp",
"in" : "query",
"description" : "The final timestamp used in the parsing of the events of interest.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "number",
"example" : 500
}
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Thresholds"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "search results matching criteria",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/FramedDataset"
}
}
}
},
"400" : {
"description" : "Missing information in the performed request"
},
"404" : {
"description" : "Could not find storyboard {id}"
}
}
},
"delete" : {
"tags" : [ "storyboard" ],
"summary" : "Delete storyboard",
"description" : "Delete the a dataset and associated data from the server",
"operationId" : "deleteStoryboard",
"parameters" : [ {
"name" : "id",
"in" : "path",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "number",
"example" : 1
}
} ],
"responses" : {
"200" : {
"description" : "Proceeded with dataset deletion"
}
}
}
}
},
"components" : {
"schemas" : {
"Dataset" : {
"required" : [ "dataset", "metadata" ],
"type" : "object",
"properties" : {
"dataset" : {
"type" : "array",
"description" : "The dataset as a sequence of polygons (as a list of vertices)",
"example" : [ [ [ 0, 1 ], [ 1, 0 ], [ 0, 0 ] ], [ [ 4, 5 ], [ 5, 4 ], [ 4, 4 ] ] ],
"items" : {
"type" : "array",
"items" : {
"type" : "array",
"items" : {
"type" : "number"
}
}
}
},
"metadata" : {
"$ref" : "#/components/schemas/DatasetMetadata"
}
}
},
"DatasetMetadata" : {
"required" : [ "startTime", "timePeriod" ],
"type" : "object",
"properties" : {
"timePeriod" : {
"type" : "number",
"description" : "The number of milliseconds seprating each dataset snapshot.",
"example" : 5
},
"startTime" : {
"type" : "number",
"description" : "The number of milliseconds, elapsed since 1 Jan 1970, when the dataset occurs.",
"example" : 100
},
"name" : {
"type" : "string",
"description" : "This dataset name.",
"example" : "DatasetNameExample"
}
}
},
"GenericThreshold" : {
"type" : "object",
"properties" : {
"delta" : {
"type" : "number",
"description" : "Value above which an event is triggered, using this threshold, between two sequential temporal snapshots",
"example" : 3.1
},
"directedAcc" : {
"type" : "number",
"description" : "Value above which an event is triggered, using this threshold, between a sequence of temporal snapshots, that progress in the same direction",
"example" : 8
},
"absoluteAcc" : {
"type" : "number",
"description" : "Value above which an event is triggered, using this threshold, between a sequence of temporal snapshots",
"example" : 10.2
},
"noiseEpsilon" : {
"type" : "number",
"description" : "Value below which transformations are considered to be noise and therefore, assumed to be null",
"example" : 0.02
}
}
},
"TranslationThresholds" : {
"description" : "The threshold is the magnitude of the translation. The return of this processing will be a translation vector.",
"allOf" : [ {
"$ref" : "#/components/schemas/GenericThreshold"
} ]
},
"RotationThresholds" : {
"description" : "The threshold is the absolute rotation in degrees. The return of this processing will be the triggering angle (either positive or negative), also in degrees.",
"allOf" : [ {
"$ref" : "#/components/schemas/GenericThreshold"
} ]
},
"UniformScaleThresholds" : {
"description" : "The threshold is the absolute value of the difference of scaling (e.g. a threshold of 0.2 will be triggered on a scaling of 1.2 and of 0.8). The return of this processing is the scaled that occurred (e.g. 1.2 or 0.8).",
"allOf" : [ {
"$ref" : "#/components/schemas/GenericThreshold"
} ]
},
"ThresholdParameters" : {
"type" : "object",
"properties" : {
"translation" : {
"$ref" : "#/components/schemas/TranslationThresholds"
},
"rotation" : {
"$ref" : "#/components/schemas/RotationThresholds"
},
"scale" : {
"$ref" : "#/components/schemas/UniformScaleThresholds"
},
"immutability" : {
"type" : "number",
"description" : "The threshold represents the amount of time the polygon has to be imutable to be considered as such.",
"example" : 1000
}
}
},
"Thresholds" : {
"required" : [ "parameters" ],
"type" : "object",
"properties" : {
"parameters" : {
"$ref" : "#/components/schemas/ThresholdParameters"
}
}
},
"Snapshot" : {
"required" : [ "representation", "timestamp" ],
"type" : "object",
"properties" : {
"representation" : {
"type" : "array",
"example" : [ [ 0, 2 ], [ 2, 0 ], [ 0, 0 ] ],
"items" : {
"type" : "array",
"items" : {
"type" : "number"
}
}
},
"timestamp" : {
"type" : "number",
"example" : 84
}
}
},
"Event" : {
"required" : [ "trigger", "triggerValue", "type" ],
"type" : "object",
"properties" : {
"trigger" : {
"type" : "string",
"description" : "In IMMUTABILITY and UNIMPORTANT events this value is set to null",
"example" : "DIRECTED_ACC",
"enum" : [ "DELTA", "DIRECTED_ACC", "ABSOLUTE_ACC]" ]
},
"type" : {
"type" : "string",
"example" : "TRANSLATION",
"enum" : [ "IMMUTABILITY", "UNIMPORTANT", "TRANSLATION", "ROTATION", "UNIFORM_SCALE" ]
},
"triggerValue" : {
"$ref" : "#/components/schemas/Event_triggerValue"
}
}
},
"Frame" : {
"required" : [ "events", "phenomena", "temporalRange" ],
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Event"
}
},
"temporalRange" : {
"type" : "array",
"example" : [ 84, 99 ],
"items" : {
"type" : "number"
}
},
"phenomena" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Snapshot"
}
}
}
},
"FramedDataset" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Frame"
}
},
"body" : {
"type" : "object",
"properties" : {
"dataset" : {
"type" : "string",
"format" : "binary"
}
}
},
"Event_triggerValue" : {
"type" : "object",
"properties" : {
"transformation" : {
"example" : [ 1, 0 ],
"oneOf" : [ {
"type" : "number"
}, {
"type" : "array",
"items" : {
"type" : "number"
}
} ]
}
},
"description" : "In UNIMPORTANT events this value is set to null"
}
}
}
}