-
Notifications
You must be signed in to change notification settings - Fork 0
/
request_ideko_GetHistoricalData.json
4395 lines (4341 loc) · 113 KB
/
request_ideko_GetHistoricalData.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
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[{
"blueprint": {
"INTERNAL_STRUCTURE": {
"Overview": {
"name": "DITAS Machine 1 - Soraluce FS",
"description": "VDC blueprint for the 'DITAS Machines 1 - Soraluce FS' at Ideko",
"tags": [{
"method_id": "GetHistoricalData",
"tags": ["machine", "batch", "data", "json"]
},
{
"method_id": "GetStreamingData",
"tags": ["machine", "stream", "streaming", "data", "json"]
},
{
"method_id": "GetIndicatorsData",
"tags": ["indicators", "batch", "data", "json"]
}
]
},
"Data_Sources": [{
"id": "MachineTimeseriesDatabase",
"description": "Machine timeseries database (InfluxDB) located in the smart box of the machine",
"location": "edge",
"class": "time-series database",
"type": "InfluxDB",
"parameters": {
"ip": "172.16.33.125",
"port": "****",
"user": "****",
"password": "****",
"database": "****"
},
"schema": {
"TO-DO": "[Borja - To define the schema of the database. Check Javi Escaqrtin's CSV data examples to devise the future influxDB structure]"
}
},
{
"id": "InboxStreamingAPI",
"description": "In-box streaming API served directly from the interoperability module on the smart box",
"location": "edge",
"class": "data stream",
"type": "rest",
"parameters": {
"url": "https://172.16.33.125",
"port": "****"
}
},
{
"id": "SavvyCloudAPI",
"description": "Savvy cloud API with both the streaming and REST endpoints",
"location": "cloud",
"class": "api",
"type": "rest",
"parameters": {
"readme": "The following key / secret are the credentials used in the Node-RED flow.",
"api-key": "****",
"api-secret": "****"
}
}
],
"Flow": {
"platform": "Node-RED",
"source_code": [{
"id": "92549871.7749d8",
"type": "tab",
"label": "GetHistoricalData",
"disabled": false,
"info": "Returns the corresponding data values for to the given parameters."
},
{
"id": "acf59602.264d18",
"type": "tab",
"label": "GetStreamingData",
"disabled": false,
"info": "Returns the streaming data for the parameters given."
},
{
"id": "ffbc8cbb.da735",
"type": "tab",
"label": "GetIndicatorsData",
"disabled": false,
"info": ""
},
{
"id": "bf7664dd.0fec48",
"type": "tab",
"label": "CAF",
"disabled": false,
"info": "Entry point for the CAF"
},
{
"id": "2964b3f3.ee5bfc",
"type": "MySQLdatabase",
"z": "",
"host": "",
"port": "3306",
"db": "ditas_dummy_example",
"tz": ""
},
{
"id": "12c3fc1d.6313a4",
"type": "CassandraDatabase",
"z": "",
"hosts": "",
"port": "9042",
"keyspace": "ditas"
},
{
"id": "ebc731b5.eb8a98",
"type": "influxdb",
"z": "",
"hostname": "172.16.33.125",
"port": "8086",
"protocol": "http",
"database": "defaultdb",
"name": "InfluxDB (Smart Box 11 - DITAS Machine 1)",
"usetls": false,
"tls": ""
},
{
"id": "d9278a08.745788",
"type": "savvy",
"z": "92549871.7749d8",
"name": "GetHistoricalData",
"cncmanufacturer": "",
"endpoint": "api-ideko.savvyds.com",
"returntype": "utf-8",
"apitype": "cloud",
"port": "8017",
"key": "****",
"secret": "****",
"locationId": "",
"groupId": "",
"machineId": "",
"indicatorId": "",
"fromTs": "",
"toTs": "",
"target": "data",
"x": 770,
"y": 300,
"wires": [
[
"634b5a7f.61fa34"
]
]
},
{
"id": "634b5a7f.61fa34",
"type": "http response",
"z": "92549871.7749d8",
"name": "",
"statusCode": "",
"streamResponse": "0",
"headers": {
},
"x": 990,
"y": 320,
"wires": [
]
},
{
"id": "bb795321.eeab8",
"type": "function",
"z": "92549871.7749d8",
"name": "Add config params to msg",
"func": "// First of all, if the node is clossing the connection, ndo nothing\nif (msg.connectionClosed !== true)\n{\n // We force the parameters into the query as there \n //is no way to use named AND OPTIONAL parameters\n var queryParams = msg.req.query;\n \n // Mandatory\n msg.locationId = queryParams.location;\n msg.machineId = queryParams.machine;\n \n // Mandatory timestamps\n msg.fromTs = queryParams.from;\n msg.toTs = queryParams.to;\n \n // Optional\n msg.groupId = undefined;\n msg.indicatorId = undefined;\n if (queryParams.group !== undefined)\n msg.groupId = queryParams.group\n if (queryParams.indicator !== undefined)\n msg.indicatorId = queryParams.indicator\n \n return msg;\n}",
"outputs": 1,
"noerr": 0,
"x": 510,
"y": 200,
"wires": [
[
"d9278a08.745788"
]
]
},
{
"id": "90399ffc.215b4",
"type": "savvy",
"z": "acf59602.264d18",
"name": "GetStreamingData",
"cncmanufacturer": "",
"endpoint": "api-ideko.savvyds.com",
"returntype": "utf-8",
"apitype": "cloud",
"port": "8017",
"key": "****",
"secret": "****",
"locationId": "",
"groupId": "",
"machineId": "",
"indicatorId": "",
"fromTs": "",
"toTs": "",
"target": "stream",
"x": 730,
"y": 180,
"wires": [
[
"3fb02483.73346c"
]
]
},
{
"id": "3fb02483.73346c",
"type": "http response",
"z": "acf59602.264d18",
"name": "http",
"statusCode": "",
"streamResponse": "1",
"headers": {
"Transfer-Encoding": "chunked",
"Content-type": "text/json; charset=UTF-8"
},
"x": 930,
"y": 180,
"wires": [
]
},
{
"id": "7dcef958.7befd8",
"type": "function",
"z": "acf59602.264d18",
"name": "Add config params to msg",
"func": "// First of all, if the node is clossing the connection, ndo nothing\nif (msg.connectionClosed !== true)\n{\n // We force the parameters into the query as there \n //is no way to use named AND OPTIONAL parameters\n var queryParams = msg.req.query;\n \n // Mandatory - can be comma separated list of machines\n msg.machineId = queryParams.machines;\n \n return msg;\n}\n\n",
"outputs": 1,
"noerr": 0,
"x": 430,
"y": 100,
"wires": [
[
"90399ffc.215b4"
]
]
},
{
"id": "bbb156bf.cae418",
"type": "function",
"z": "acf59602.264d18",
"name": "Stream stopper",
"func": "// Sens s STOP signal to the Savy node if the \n// HTTP In node indicates that the connection\n// was closed\nif (msg.connectionClosed === true)\n{\n msg.stopRequest = true;\n return msg;\n}\n// Creo que si la propiedad connectionClosed no es \n// True no se manda nada por lo que el flujo no llega \n// al siguiente mensage",
"outputs": 1,
"noerr": 0,
"x": 420,
"y": 240,
"wires": [
[
"90399ffc.215b4"
]
]
},
{
"id": "48c6bb17.28ef04",
"type": "function",
"z": "92549871.7749d8",
"name": "Stream stopper",
"func": "// Sens s STOP signal to the Savy node if the \n// HTTP In node indicates that the connection\n// was closed\nif (msg.connectionClosed === true)\n{\n msg.stopRequest = true;\n return msg;\n}\n// Creo que si la propiedad connectionClosed no es \n// True no se manda nada por lo que el flujo no llega \n// al siguiente mensage",
"outputs": 1,
"noerr": 0,
"x": 500,
"y": 360,
"wires": [
[
"d9278a08.745788"
]
]
},
{
"id": "6c391f38.b49a",
"type": "http in",
"z": "bf7664dd.0fec48",
"name": "CAF",
"url": "/caf/:exposed_method",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 170,
"y": 260,
"wires": [
[
"a34c3ab7.2b2648"
]
]
},
{
"id": "c6354a5f.9a27b8",
"type": "link in",
"z": "acf59602.264d18",
"name": "GetStreamingData",
"links": [
"483696d9.5a2a18",
"d07c247f.32b3a8"
],
"x": 195,
"y": 180,
"wires": [
[
"7dcef958.7befd8",
"bbb156bf.cae418"
]
]
},
{
"id": "a34c3ab7.2b2648",
"type": "switch",
"z": "bf7664dd.0fec48",
"name": "method",
"property": "req.params.exposed_method",
"propertyType": "msg",
"rules": [{
"t": "eq",
"v": "GetHistoricalData",
"vt": "str"
},
{
"t": "eq",
"v": "GetStreamingData",
"vt": "str"
},
{
"t": "eq",
"v": "GetIndicatorsData",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 400,
"y": 260,
"wires": [
[
"78601f23.39967"
],
[
"483696d9.5a2a18"
],
[
"b682e12c.b9d188"
],
[
"bfc0d085.f305"
]
]
},
{
"id": "78601f23.39967",
"type": "link out",
"z": "bf7664dd.0fec48",
"name": "GetHistoricalData",
"links": [
"f09145e4.b52c08"
],
"x": 675,
"y": 220,
"wires": [
]
},
{
"id": "483696d9.5a2a18",
"type": "link out",
"z": "bf7664dd.0fec48",
"name": "GetStreamingData",
"links": [
"c6354a5f.9a27b8"
],
"x": 675,
"y": 259,
"wires": [
]
},
{
"id": "bfc0d085.f305",
"type": "function",
"z": "bf7664dd.0fec48",
"name": "method not exists",
"func": "msg.payload = \"The exposed doesn't exist: \" + msg.req.params.exposed_method;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 630,
"y": 400,
"wires": [
[
"f5884c46.ee402"
]
]
},
{
"id": "f5884c46.ee402",
"type": "http response",
"z": "bf7664dd.0fec48",
"name": "",
"statusCode": "",
"streamResponse": "0",
"headers": {
},
"x": 830,
"y": 400,
"wires": [
]
},
{
"id": "f09145e4.b52c08",
"type": "link in",
"z": "92549871.7749d8",
"name": "GetHistoricalData",
"links": [
"78601f23.39967"
],
"x": 275,
"y": 280,
"wires": [
[
"bb795321.eeab8",
"48c6bb17.28ef04"
]
]
},
{
"id": "49c76178.372888",
"type": "http response",
"z": "ffbc8cbb.da735",
"name": "",
"statusCode": "",
"headers": {
},
"x": 770,
"y": 580,
"wires": [
]
},
{
"id": "fcfdcb1c.53ca18",
"type": "link in",
"z": "ffbc8cbb.da735",
"name": "GetIndicatorsData",
"links": [
"b682e12c.b9d188"
],
"x": 195,
"y": 120,
"wires": [
[
"f26e6103.2732a"
]
]
},
{
"id": "f26e6103.2732a",
"type": "function",
"z": "ffbc8cbb.da735",
"name": "Generate InfluxDB query",
"func": "// First of all, if the node is clossing the connection, do nothing\nif (msg.connectionClosed !== true)\n{\n // Get the variables from the query\n var queryParams = msg.req.query;\n \n // Get timestamps and convert them to ISO string (mandatory for InfluxDB)\n var fromTs = (new Date(Number(queryParams.from))).toISOString();\n var toTs = (new Date(Number(queryParams.to))).toISOString();\n\n // Get indicator list\n var indicatorList = queryParams.indicators;\n\n // Set the InfluxDB query\n msg.query = \"SELECT * FROM \" + indicatorList + \" WHERE time > '\" + fromTs + \"' AND time < '\" + toTs + \"'\";\n\t\n\treturn msg;\n}\n\n",
"outputs": 1,
"noerr": 0,
"x": 450,
"y": 120,
"wires": [
[
"859e9e3c.f07058"
]
]
},
{
"id": "859e9e3c.f07058",
"type": "influxdb in",
"z": "ffbc8cbb.da735",
"influxdb": "ebc731b5.eb8a98",
"name": "Query InfluxDB",
"query": "",
"rawOutput": true,
"precision": "",
"retentionPolicy": "",
"x": 420,
"y": 240,
"wires": [
[
"8ace18d8.1a717"
]
]
},
{
"id": "1739c7cb.b94798",
"type": "function",
"z": "ffbc8cbb.da735",
"name": "Parse InfluxDB response",
"func": "// See the comment node for a large comment for this function.\n\n// Get InfluxDB response object\ninfluxDBResponse = msg.influxDBResponse;\n\n// Get variable list names from the Savvy node and parse them to a JSON object\nvariableList = msg.payload;\nindicatorsJSONObj = JSON.parse(variableList)['indicators'];\n\n// If the influxDBResponse is not empty, keep going\nif (typeof influxDBResponse !== 'undefined')\n{\n\n // Define final array\n var outputArray = []\n \n // For each line of the response, create the proper structure\n influxDBResponse.forEach(function(element)\n {\n \n // One for for each indicator id\n var itemObject = new Object();\n \n // Be careful, InfluxDB returns the indicatorId on the \".name\" path\n // This is because the name of the measurement is the indicatorId itself\n itemObject.indicatorId = element.name;\n itemObject.indicatorName = getIndicatorName(itemObject.indicatorId); // Get real indicator name\n \n // Generate empty data array\n var dataArray = []\n \n // Loop the data, and generate the proper structure\n element.values.forEach(function(innerData)\n {\n var dataObject = new Object();\n dataObject.timestamp = innerData[0]; // Timestamp is always on pos 0\n dataObject.value = innerData[2]; // Value is always on pos 2\n dataArray.push(dataObject)\n });\n itemObject.data = dataArray;\n \n // Push the entire object to the output array\n outputArray.push(itemObject)\n \n });\n \n // Set payload to the output array\n msg.payload = outputArray;\n}\nelse\n{\n // TODO: Still to be defined\n /*\n responseArray = [];\n var responseObj = new Object();\n responseObj.status = \"404\";\n responseObj.message = \"No data for requested parameters\";\n */\n msg.payload = \"No data for requested parameters\";\n}\n\n/*\n* From a given IndicatorId, return its real name \n*\n* @param string - indicatorId - Id of the indicator\n* @return string - Name of the indicator\n*/\nfunction getIndicatorName(indicatorId)\n{\n var i;\n for (i = 0; i < indicatorsJSONObj.length; i++)\n {\n if (indicatorsJSONObj[i]['indicatorId'] === indicatorId)\n {\n return indicatorsJSONObj[i]['indicatorName'];\n } \n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 450,
"y": 580,
"wires": [
[
"49c76178.372888"
]
]
},
{
"id": "34c5f4ac.28fc4c",
"type": "comment",
"z": "ffbc8cbb.da735",
"name": "READ: Parsing explanation",
"info": "This code gets the raw output from the InfluxDB node,\nand parses it to get the following output:\n\n[\n\t{\n\t\tindicatorId = I_IND_1,\n\t\tdata = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttimestamp = XXX\n\t\t\t\t\t\tvalue = XX\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttimestamp = XXX\n\t\t\t\t\t\tvalue = XX\n\t\t\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tindicatorId = I_IND_2,\n\t\tdata = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttimestamp = XXX\n\t\t\t\t\t\tvalue = XX\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttimestamp = XXX\n\t\t\t\t\t\tvalue = XX\n\t\t\t\t\t}\n\t\t]\n\t}\n]\n*/",
"x": 450,
"y": 620,
"wires": [
]
},
{
"id": "3721c516.23799a",
"type": "savvy",
"z": "ffbc8cbb.da735",
"name": "GetIndicatorsData",
"cncmanufacturer": "",
"endpoint": "172.16.33.202",
"returntype": "utf-8",
"apitype": "local",
"port": "8006",
"key": "",
"secret": "",
"locationId": "",
"groupId": "",
"machineId": "",
"indicatorId": "",
"fromTs": "",
"toTs": "",
"target": "details-indicator",
"x": 430,
"y": 480,
"wires": [
[
"1739c7cb.b94798"
]
]
},
{
"id": "8ace18d8.1a717",
"type": "function",
"z": "ffbc8cbb.da735",
"name": "Manage InfluxDB reponse variable",
"func": "// Set initial value as null\nmsg.influxDBResponses = null;\n\n// Get response from the proper path from the InfluxDB node\nvar influxDBResponse = msg.payload['results'][0]['series'];\n\n// If it's defined, set the variable\nif (typeof influxDBResponse !== 'undefined')\n{\n // Set the InfluxDB response on the proper msg path\n msg.influxDBResponse = influxDBResponse;\n} \nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 480,
"y": 360,
"wires": [
[
"3721c516.23799a"
]
]
},
{
"id": "688c12bf.10ae4c",
"type": "comment",
"z": "ffbc8cbb.da735",
"name": "InfluxDB query format",
"info": "The InfluxDB query has the following form:\n\nSELECT\n *\nFROM\n I_CNK_X1Z8SG_BT67AW,I_CNK_X1Z8SG_LPTD3K\nWHERE\n time > '2018-07-17T07:10:00.000Z'\n AND\n time < '2018-07-17T07:15:00.000Z'\n \n \n",
"x": 440,
"y": 80,
"wires": [
]
},
{
"id": "b682e12c.b9d188",
"type": "link out",
"z": "bf7664dd.0fec48",
"name": "GetStreamingData",
"links": [
"fcfdcb1c.53ca18"
],
"x": 675,
"y": 300,
"wires": [
]
}
]
},
"Testing_Output_Data": [{
"method_id": "GetHistoricalData",
"zip_data": "TO-DO URL to a zip file with data samples"
},
{
"method_id": "GetStreamingData",
"zip_data": "TO-DO URL to a zip file with data samples"
},
{
"method_id": "GetIndicatorsData",
"zip_data": "TO-DO URL to a zip file with data samples"
}
]
},
"DATA_MANAGEMENT": [{
"method_id": "GetHistoricalData",
"attributes": {
"dataUtility": [{
"id": "availability_9099",
"description": "Availability 90-99",
"type": "Availability",
"properties": {
"availability": {
"unit": "percentage",
"minimum": 90,
"maximum": 99
}
}
},
{
"id": "processCompleteness_80",
"description": "Process completeness 80",
"type": "Process completeness",
"properties": {
"completeness": {
"minimum": 80,
"unit": "percentage"
}
}
},
{
"id": "throughput_18",
"description": "Throughput 1.8",
"type": "Throughput",
"properties": {
"throughput": {
"value": 1.8,
"unit": "MB/s"
}
}
},
{
"id": "precision_08",
"description": "Precision 0.8",
"type": "Precision",
"properties": {
"precision": {
"minimum": 0.8,
"unit": "none"
}
}
},
{
"id": "accuracy_09",
"description": "Accuracy 0.9",
"type": "Accuracy",
"properties": {
"accuracy": {
"minimum": 0.9,
"unit": "none"
}
}
}
],
"security": [],
"privacy": []
}
},
{
"method_id": "GetStreamingData",
"attributes": {
"dataUtility": [{
"id": "availability_9099",
"description": "Availability 90-99",
"type": "Availability",
"properties": {
"availability": {
"unit": "percentage",
"minimum": 90,
"maximum": 99
}
}
},
{
"id": "processCompleteness_80",
"description": "Process completeness 80",
"type": "Process completeness",
"properties": {
"completeness": {
"minimum": 80,
"unit": "percentage"
}
}
},
{
"id": "timeliness_065",
"description": "Timeliness 0.65",
"type": "Timeliness",
"properties": {
"timeliness": {
"maximum": 0.65,
"unit": "NONE"
}
}
},
{
"id": "precision_08",
"description": "Precision 0.8",
"type": "Precision",
"properties": {
"precision": {
"minimum": 0.8,
"unit": "none"
}
}
},
{
"id": "accuracy_09",
"description": "Accuracy 0.9",
"type": "Accuracy",
"properties": {
"accuracy": {
"minimum": 0.9,
"unit": "none"
}
}
}
],
"security": [],
"privacy": []
}
},
{
"method_id": "GetIndicatorsData",
"attributes": {
"dataUtility": [{
"id": "availability_8099",
"description": "Availability 80-99",
"type": "Availability",
"properties": {
"availability": {
"unit": "percentage",
"minimum": 80,
"maximum": 99
}
}
},
{
"id": "processCompleteness_80",
"description": "Process completeness 80",
"type": "Process completeness",
"properties": {
"completeness": {
"minimum": 80,
"unit": "percentage"
}
}
},
{
"id": "throughput_14",
"description": "Throughput 1.4",
"type": "Throughput",
"properties": {
"throughput": {
"value": 1.4,
"unit": "MB/s"
}
}
},
{
"id": "precision_08",
"description": "Precision 0.8",
"type": "Precision",
"properties": {
"precision": {
"minimum": 0.8,
"unit": "none"
}
}
},
{
"id": "accuracy_09",
"description": "Accuracy 0.9",
"type": "Accuracy",
"properties": {
"accuracy": {
"minimum": 0.9,
"unit": "none"
}
}
}
],
"security": [],
"privacy": []
}
}
],
"ABSTRACT_PROPERTIES": {},
"COOKBOOK_APPENDIX": {},
"EXPOSED_API": {
"openapi": "3.0.0",
"info": {
"title": "IDEKO VDC",
"description": "VDC methods for the IDEKO use case",
"version": "0.0.1"
},
"paths": {
"/GetHistoricalData": {
"get": {
"summary": "Returns the corresponding data values for to the given parameters.",
"operationId": "GetHistoricalData",
"parameters": [{
"in": "query",
"name": "location",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "machine",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "group",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "indicator",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "from",
"required": true,
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "to",
"required": true,
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetHistoricalDataResponse"
}
},
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"x-data-sources": [
"SavvyCloudAPI"
]
}
},
"/GetStreamingData": {
"get": {
"summary": "Returns the streaming data for the parameters given.",
"operationId": "GetStreamingData",
"parameters": [{
"in": "query",
"name": "machines",
"required": true,
"schema": {
"type": "string"
}
}],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetStreamingDataResponse"
}
},
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"x-data-sources": [
"SavvyCloudAPI"
]
}
},
"/GetIndicatorsData": {
"get": {
"summary": "Returns the data and the human names for the given indicatorIdList of the given date range. The from and to values must be timestamps in milliseconds. Indicators values are gathered from the InfluxDB deployed in the smart-box. The human names are gathered from the in-box API.",
"operationId": "GetIndicatorsData",
"parameters": [{
"in": "query",
"name": "indicators",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "from",
"required": true,
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "to",
"required": true,
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetIndicatorsDataResponse"
}
},
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"x-data-sources": [
"SavvyCloudAPI"