@twin.org/telemetry-service 0.0.1-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1085 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "TWIN - Test Endpoints",
5
+ "description": "REST API for TWIN - Test Endpoints.",
6
+ "version": "1.0.0",
7
+ "license": {
8
+ "name": "Apache 2.0 License",
9
+ "url": "https://opensource.org/licenses/Apache-2.0"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://localhost"
15
+ }
16
+ ],
17
+ "tags": [
18
+ {
19
+ "name": "Telemetry",
20
+ "description": "Endpoints which are modelled to access a telemetry contract."
21
+ }
22
+ ],
23
+ "paths": {
24
+ "/telemetry/metric": {
25
+ "post": {
26
+ "operationId": "telemetryCreateMetric",
27
+ "summary": "Create a telemetry metric",
28
+ "tags": [
29
+ "Telemetry"
30
+ ],
31
+ "security": [
32
+ {
33
+ "jwtBearerAuthScheme": []
34
+ }
35
+ ],
36
+ "requestBody": {
37
+ "description": "Create a new telemetry metric.",
38
+ "required": true,
39
+ "content": {
40
+ "application/json": {
41
+ "schema": {
42
+ "$ref": "#/components/schemas/TelemetryMetric"
43
+ },
44
+ "examples": {
45
+ "telemetryCreateMetricRequestExample": {
46
+ "value": {
47
+ "id": "my-counter",
48
+ "label": "My Counter",
49
+ "description": "This is my counter",
50
+ "type": 0,
51
+ "unit": "KG"
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ },
58
+ "responses": {
59
+ "201": {
60
+ "description": "The rest request ended in created response.",
61
+ "headers": {
62
+ "location": {
63
+ "schema": {
64
+ "type": "string"
65
+ },
66
+ "description": "e.g. my-counter"
67
+ }
68
+ }
69
+ },
70
+ "400": {
71
+ "description": "The server cannot process the request, see the content for more details.",
72
+ "content": {
73
+ "application/json": {
74
+ "schema": {
75
+ "$ref": "#/components/schemas/Error"
76
+ },
77
+ "examples": {
78
+ "exampleResponse": {
79
+ "value": {
80
+ "name": "GeneralError",
81
+ "message": "component.error",
82
+ "properties": {
83
+ "foo": "bar"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "401": {
92
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
93
+ "content": {
94
+ "application/json": {
95
+ "schema": {
96
+ "$ref": "#/components/schemas/Error"
97
+ },
98
+ "examples": {
99
+ "exampleResponse": {
100
+ "value": {
101
+ "name": "UnauthorizedError",
102
+ "message": "component.error"
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "500": {
110
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
111
+ "content": {
112
+ "application/json": {
113
+ "schema": {
114
+ "$ref": "#/components/schemas/Error"
115
+ },
116
+ "examples": {
117
+ "exampleResponse": {
118
+ "value": {
119
+ "name": "InternalServerError",
120
+ "message": "component.error"
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "get": {
130
+ "operationId": "telemetryListEntries",
131
+ "summary": "Get a list of the telemetry metrics",
132
+ "tags": [
133
+ "Telemetry"
134
+ ],
135
+ "parameters": [
136
+ {
137
+ "name": "type",
138
+ "description": "The type of the metric.",
139
+ "in": "query",
140
+ "required": false,
141
+ "schema": {
142
+ "$ref": "#/components/schemas/MetricType"
143
+ }
144
+ },
145
+ {
146
+ "name": "cursor",
147
+ "description": "The optional cursor to get next chunk.",
148
+ "in": "query",
149
+ "required": false,
150
+ "schema": {
151
+ "type": "string"
152
+ }
153
+ },
154
+ {
155
+ "name": "pageSize",
156
+ "description": "The maximum number of entities in a page.",
157
+ "in": "query",
158
+ "required": false,
159
+ "schema": {
160
+ "type": "number"
161
+ }
162
+ }
163
+ ],
164
+ "security": [
165
+ {
166
+ "jwtBearerAuthScheme": []
167
+ }
168
+ ],
169
+ "responses": {
170
+ "200": {
171
+ "description": "Response for telemetry list request.",
172
+ "content": {
173
+ "application/json": {
174
+ "schema": {
175
+ "$ref": "#/components/schemas/TelemetryListResponse"
176
+ },
177
+ "examples": {
178
+ "telemetryListResponseExample": {
179
+ "value": {
180
+ "entities": [
181
+ {
182
+ "id": "my-counter",
183
+ "label": "My Counter",
184
+ "type": 0,
185
+ "unit": "KG"
186
+ },
187
+ {
188
+ "id": "my-counter-2",
189
+ "label": "My Counter 2",
190
+ "type": 1,
191
+ "unit": "M"
192
+ }
193
+ ],
194
+ "cursor": "1"
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ },
201
+ "400": {
202
+ "description": "The server cannot process the request, see the content for more details.",
203
+ "content": {
204
+ "application/json": {
205
+ "schema": {
206
+ "$ref": "#/components/schemas/Error"
207
+ },
208
+ "examples": {
209
+ "exampleResponse": {
210
+ "value": {
211
+ "name": "GeneralError",
212
+ "message": "component.error",
213
+ "properties": {
214
+ "foo": "bar"
215
+ }
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ },
222
+ "401": {
223
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
224
+ "content": {
225
+ "application/json": {
226
+ "schema": {
227
+ "$ref": "#/components/schemas/Error"
228
+ },
229
+ "examples": {
230
+ "exampleResponse": {
231
+ "value": {
232
+ "name": "UnauthorizedError",
233
+ "message": "component.error"
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }
239
+ },
240
+ "500": {
241
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
242
+ "content": {
243
+ "application/json": {
244
+ "schema": {
245
+ "$ref": "#/components/schemas/Error"
246
+ },
247
+ "examples": {
248
+ "exampleResponse": {
249
+ "value": {
250
+ "name": "InternalServerError",
251
+ "message": "component.error"
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
258
+ }
259
+ }
260
+ },
261
+ "/telemetry/metric/{id}": {
262
+ "get": {
263
+ "operationId": "telemetryGetMetric",
264
+ "summary": "Get a telemetry metric and it's most recent value",
265
+ "tags": [
266
+ "Telemetry"
267
+ ],
268
+ "parameters": [
269
+ {
270
+ "name": "id",
271
+ "description": "The id of the metric.",
272
+ "in": "path",
273
+ "required": true,
274
+ "schema": {
275
+ "type": "string"
276
+ },
277
+ "style": "simple",
278
+ "example": "my-counter"
279
+ }
280
+ ],
281
+ "security": [
282
+ {
283
+ "jwtBearerAuthScheme": []
284
+ }
285
+ ],
286
+ "responses": {
287
+ "200": {
288
+ "description": "Get a telemetry metric response.",
289
+ "content": {
290
+ "application/json": {
291
+ "schema": {
292
+ "$ref": "#/components/schemas/TelemetryGetMetricResponse"
293
+ },
294
+ "examples": {
295
+ "telemetryGetMetricResponseExample": {
296
+ "value": {
297
+ "metric": {
298
+ "id": "my-counter",
299
+ "label": "My Counter",
300
+ "description": "This is my counter",
301
+ "type": 0,
302
+ "unit": "KG"
303
+ },
304
+ "value": {
305
+ "id": "aabbccdd11223445566",
306
+ "ts": 1715252922273,
307
+ "value": 10
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+ },
315
+ "400": {
316
+ "description": "The server cannot process the request, see the content for more details.",
317
+ "content": {
318
+ "application/json": {
319
+ "schema": {
320
+ "$ref": "#/components/schemas/Error"
321
+ },
322
+ "examples": {
323
+ "exampleResponse": {
324
+ "value": {
325
+ "name": "GeneralError",
326
+ "message": "component.error",
327
+ "properties": {
328
+ "foo": "bar"
329
+ }
330
+ }
331
+ }
332
+ }
333
+ }
334
+ }
335
+ },
336
+ "401": {
337
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
338
+ "content": {
339
+ "application/json": {
340
+ "schema": {
341
+ "$ref": "#/components/schemas/Error"
342
+ },
343
+ "examples": {
344
+ "exampleResponse": {
345
+ "value": {
346
+ "name": "UnauthorizedError",
347
+ "message": "component.error"
348
+ }
349
+ }
350
+ }
351
+ }
352
+ }
353
+ },
354
+ "500": {
355
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
356
+ "content": {
357
+ "application/json": {
358
+ "schema": {
359
+ "$ref": "#/components/schemas/Error"
360
+ },
361
+ "examples": {
362
+ "exampleResponse": {
363
+ "value": {
364
+ "name": "InternalServerError",
365
+ "message": "component.error"
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ }
372
+ }
373
+ },
374
+ "put": {
375
+ "operationId": "telemetryUpdateMetric",
376
+ "summary": "Update a telemetry metric",
377
+ "tags": [
378
+ "Telemetry"
379
+ ],
380
+ "parameters": [
381
+ {
382
+ "name": "id",
383
+ "description": "The id of the metric.",
384
+ "in": "path",
385
+ "required": true,
386
+ "schema": {
387
+ "type": "string"
388
+ },
389
+ "style": "simple",
390
+ "example": "my-counter"
391
+ }
392
+ ],
393
+ "security": [
394
+ {
395
+ "jwtBearerAuthScheme": []
396
+ }
397
+ ],
398
+ "requestBody": {
399
+ "description": "Update a telemetry metric.",
400
+ "required": true,
401
+ "content": {
402
+ "application/json": {
403
+ "schema": {
404
+ "$ref": "#/components/schemas/TelemetryUpdateMetricRequest"
405
+ },
406
+ "examples": {
407
+ "telemetryUpdateMetricRequestExample": {
408
+ "value": {
409
+ "label": "My New Label"
410
+ }
411
+ }
412
+ }
413
+ }
414
+ }
415
+ },
416
+ "responses": {
417
+ "204": {
418
+ "description": "The rest request ended in success with no data."
419
+ },
420
+ "400": {
421
+ "description": "The server cannot process the request, see the content for more details.",
422
+ "content": {
423
+ "application/json": {
424
+ "schema": {
425
+ "$ref": "#/components/schemas/Error"
426
+ },
427
+ "examples": {
428
+ "exampleResponse": {
429
+ "value": {
430
+ "name": "GeneralError",
431
+ "message": "component.error",
432
+ "properties": {
433
+ "foo": "bar"
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ }
440
+ },
441
+ "401": {
442
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
443
+ "content": {
444
+ "application/json": {
445
+ "schema": {
446
+ "$ref": "#/components/schemas/Error"
447
+ },
448
+ "examples": {
449
+ "exampleResponse": {
450
+ "value": {
451
+ "name": "UnauthorizedError",
452
+ "message": "component.error"
453
+ }
454
+ }
455
+ }
456
+ }
457
+ }
458
+ },
459
+ "500": {
460
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
461
+ "content": {
462
+ "application/json": {
463
+ "schema": {
464
+ "$ref": "#/components/schemas/Error"
465
+ },
466
+ "examples": {
467
+ "exampleResponse": {
468
+ "value": {
469
+ "name": "InternalServerError",
470
+ "message": "component.error"
471
+ }
472
+ }
473
+ }
474
+ }
475
+ }
476
+ }
477
+ }
478
+ },
479
+ "delete": {
480
+ "operationId": "telemetryRemoveMetric",
481
+ "summary": "Remove a telemetry metric and it's values.",
482
+ "tags": [
483
+ "Telemetry"
484
+ ],
485
+ "parameters": [
486
+ {
487
+ "name": "id",
488
+ "description": "The id of the metric.",
489
+ "in": "path",
490
+ "required": true,
491
+ "schema": {
492
+ "type": "string"
493
+ },
494
+ "style": "simple",
495
+ "example": "my-counter"
496
+ }
497
+ ],
498
+ "security": [
499
+ {
500
+ "jwtBearerAuthScheme": []
501
+ }
502
+ ],
503
+ "responses": {
504
+ "204": {
505
+ "description": "The rest request ended in success with no data."
506
+ },
507
+ "400": {
508
+ "description": "The server cannot process the request, see the content for more details.",
509
+ "content": {
510
+ "application/json": {
511
+ "schema": {
512
+ "$ref": "#/components/schemas/Error"
513
+ },
514
+ "examples": {
515
+ "exampleResponse": {
516
+ "value": {
517
+ "name": "GeneralError",
518
+ "message": "component.error",
519
+ "properties": {
520
+ "foo": "bar"
521
+ }
522
+ }
523
+ }
524
+ }
525
+ }
526
+ }
527
+ },
528
+ "401": {
529
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
530
+ "content": {
531
+ "application/json": {
532
+ "schema": {
533
+ "$ref": "#/components/schemas/Error"
534
+ },
535
+ "examples": {
536
+ "exampleResponse": {
537
+ "value": {
538
+ "name": "UnauthorizedError",
539
+ "message": "component.error"
540
+ }
541
+ }
542
+ }
543
+ }
544
+ }
545
+ },
546
+ "500": {
547
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
548
+ "content": {
549
+ "application/json": {
550
+ "schema": {
551
+ "$ref": "#/components/schemas/Error"
552
+ },
553
+ "examples": {
554
+ "exampleResponse": {
555
+ "value": {
556
+ "name": "InternalServerError",
557
+ "message": "component.error"
558
+ }
559
+ }
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+ }
566
+ },
567
+ "/telemetry/metric/{id}/value": {
568
+ "post": {
569
+ "operationId": "telemetryAddMetricValue",
570
+ "summary": "Add a telemetry metric value",
571
+ "tags": [
572
+ "Telemetry"
573
+ ],
574
+ "parameters": [
575
+ {
576
+ "name": "id",
577
+ "description": "The id of the metric.",
578
+ "in": "path",
579
+ "required": true,
580
+ "schema": {
581
+ "type": "string"
582
+ },
583
+ "style": "simple",
584
+ "example": "my-counter"
585
+ }
586
+ ],
587
+ "security": [
588
+ {
589
+ "jwtBearerAuthScheme": []
590
+ }
591
+ ],
592
+ "requestBody": {
593
+ "description": "Add a telemetry metric value.",
594
+ "required": true,
595
+ "content": {
596
+ "application/json": {
597
+ "schema": {
598
+ "$ref": "#/components/schemas/TelemetryAddMetricValueRequest"
599
+ },
600
+ "examples": {
601
+ "telemetryAddMetricValueRequestExample": {
602
+ "value": {
603
+ "value": 10
604
+ }
605
+ },
606
+ "telemetryAddMetricValueIncRequestExample": {
607
+ "value": {
608
+ "value": "inc"
609
+ }
610
+ }
611
+ }
612
+ }
613
+ }
614
+ },
615
+ "responses": {
616
+ "201": {
617
+ "description": "The rest request ended in created response.",
618
+ "headers": {
619
+ "location": {
620
+ "schema": {
621
+ "type": "string"
622
+ },
623
+ "description": "e.g. aabbccdd11223445566"
624
+ }
625
+ }
626
+ },
627
+ "400": {
628
+ "description": "The server cannot process the request, see the content for more details.",
629
+ "content": {
630
+ "application/json": {
631
+ "schema": {
632
+ "$ref": "#/components/schemas/Error"
633
+ },
634
+ "examples": {
635
+ "exampleResponse": {
636
+ "value": {
637
+ "name": "GeneralError",
638
+ "message": "component.error",
639
+ "properties": {
640
+ "foo": "bar"
641
+ }
642
+ }
643
+ }
644
+ }
645
+ }
646
+ }
647
+ },
648
+ "401": {
649
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
650
+ "content": {
651
+ "application/json": {
652
+ "schema": {
653
+ "$ref": "#/components/schemas/Error"
654
+ },
655
+ "examples": {
656
+ "exampleResponse": {
657
+ "value": {
658
+ "name": "UnauthorizedError",
659
+ "message": "component.error"
660
+ }
661
+ }
662
+ }
663
+ }
664
+ }
665
+ },
666
+ "500": {
667
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
668
+ "content": {
669
+ "application/json": {
670
+ "schema": {
671
+ "$ref": "#/components/schemas/Error"
672
+ },
673
+ "examples": {
674
+ "exampleResponse": {
675
+ "value": {
676
+ "name": "InternalServerError",
677
+ "message": "component.error"
678
+ }
679
+ }
680
+ }
681
+ }
682
+ }
683
+ }
684
+ }
685
+ },
686
+ "get": {
687
+ "operationId": "telemetryValuesListEntries",
688
+ "summary": "Get a list of the values for a telemetry metric",
689
+ "tags": [
690
+ "Telemetry"
691
+ ],
692
+ "parameters": [
693
+ {
694
+ "name": "id",
695
+ "description": "The id of the metric.",
696
+ "in": "path",
697
+ "required": true,
698
+ "schema": {
699
+ "type": "string"
700
+ },
701
+ "style": "simple",
702
+ "example": "my-counter"
703
+ },
704
+ {
705
+ "name": "timeStart",
706
+ "description": "The start time of the metrics to retrieve as a timestamp in ms.",
707
+ "in": "query",
708
+ "required": false,
709
+ "schema": {
710
+ "type": "number"
711
+ }
712
+ },
713
+ {
714
+ "name": "timeEnd",
715
+ "description": "The end time of the metrics to retrieve as a timestamp in ms.",
716
+ "in": "query",
717
+ "required": false,
718
+ "schema": {
719
+ "type": "number"
720
+ }
721
+ },
722
+ {
723
+ "name": "cursor",
724
+ "description": "The optional cursor to get next chunk.",
725
+ "in": "query",
726
+ "required": false,
727
+ "schema": {
728
+ "type": "string"
729
+ }
730
+ },
731
+ {
732
+ "name": "pageSize",
733
+ "description": "The maximum number of entities in a page.",
734
+ "in": "query",
735
+ "required": false,
736
+ "schema": {
737
+ "type": "number"
738
+ }
739
+ }
740
+ ],
741
+ "security": [
742
+ {
743
+ "jwtBearerAuthScheme": []
744
+ }
745
+ ],
746
+ "responses": {
747
+ "200": {
748
+ "description": "Response for telemetry list request.",
749
+ "content": {
750
+ "application/json": {
751
+ "schema": {
752
+ "$ref": "#/components/schemas/TelemetryValuesListResponse"
753
+ },
754
+ "examples": {
755
+ "telemetryValuesListResponseExample": {
756
+ "value": {
757
+ "metric": {
758
+ "id": "my-counter",
759
+ "label": "My Counter",
760
+ "type": 0,
761
+ "unit": "KG"
762
+ },
763
+ "entities": [
764
+ {
765
+ "id": "aabbccdd11223445566",
766
+ "ts": 1715252922273,
767
+ "value": 10
768
+ },
769
+ {
770
+ "id": "aabbccdd11223445566",
771
+ "ts": 1715252922274,
772
+ "value": 11
773
+ }
774
+ ],
775
+ "cursor": "1"
776
+ }
777
+ }
778
+ }
779
+ }
780
+ }
781
+ },
782
+ "400": {
783
+ "description": "The server cannot process the request, see the content for more details.",
784
+ "content": {
785
+ "application/json": {
786
+ "schema": {
787
+ "$ref": "#/components/schemas/Error"
788
+ },
789
+ "examples": {
790
+ "exampleResponse": {
791
+ "value": {
792
+ "name": "GeneralError",
793
+ "message": "component.error",
794
+ "properties": {
795
+ "foo": "bar"
796
+ }
797
+ }
798
+ }
799
+ }
800
+ }
801
+ }
802
+ },
803
+ "401": {
804
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
805
+ "content": {
806
+ "application/json": {
807
+ "schema": {
808
+ "$ref": "#/components/schemas/Error"
809
+ },
810
+ "examples": {
811
+ "exampleResponse": {
812
+ "value": {
813
+ "name": "UnauthorizedError",
814
+ "message": "component.error"
815
+ }
816
+ }
817
+ }
818
+ }
819
+ }
820
+ },
821
+ "500": {
822
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
823
+ "content": {
824
+ "application/json": {
825
+ "schema": {
826
+ "$ref": "#/components/schemas/Error"
827
+ },
828
+ "examples": {
829
+ "exampleResponse": {
830
+ "value": {
831
+ "name": "InternalServerError",
832
+ "message": "component.error"
833
+ }
834
+ }
835
+ }
836
+ }
837
+ }
838
+ }
839
+ }
840
+ }
841
+ }
842
+ },
843
+ "components": {
844
+ "schemas": {
845
+ "Error": {
846
+ "type": "object",
847
+ "properties": {
848
+ "name": {
849
+ "type": "string",
850
+ "description": "The name for the error."
851
+ },
852
+ "message": {
853
+ "type": "string",
854
+ "description": "The message for the error."
855
+ },
856
+ "source": {
857
+ "type": "string",
858
+ "description": "The source of the error."
859
+ },
860
+ "properties": {
861
+ "type": "object",
862
+ "additionalProperties": {},
863
+ "description": "Any additional information for the error."
864
+ },
865
+ "stack": {
866
+ "type": "string",
867
+ "description": "The stack trace for the error."
868
+ },
869
+ "inner": {
870
+ "$ref": "#/components/schemas/Error"
871
+ }
872
+ },
873
+ "required": [
874
+ "name",
875
+ "message"
876
+ ],
877
+ "additionalProperties": false,
878
+ "description": "Model to describe serialized error."
879
+ },
880
+ "MetricType": {
881
+ "anyOf": [
882
+ {
883
+ "type": "number",
884
+ "const": 0,
885
+ "description": "Counter."
886
+ },
887
+ {
888
+ "type": "number",
889
+ "const": 1,
890
+ "description": "Increment Decrement Counter."
891
+ },
892
+ {
893
+ "type": "number",
894
+ "const": 2,
895
+ "description": "Gauge."
896
+ }
897
+ ],
898
+ "description": "The types of metrics."
899
+ },
900
+ "TelemetryAddMetricValueRequest": {
901
+ "type": "object",
902
+ "properties": {
903
+ "value": {
904
+ "anyOf": [
905
+ {
906
+ "type": "string",
907
+ "const": "inc"
908
+ },
909
+ {
910
+ "type": "string",
911
+ "const": "dec"
912
+ },
913
+ {
914
+ "type": "number"
915
+ }
916
+ ],
917
+ "description": "The value for the update operation."
918
+ },
919
+ "customData": {
920
+ "type": "object",
921
+ "additionalProperties": {},
922
+ "description": "The custom data for the update operation."
923
+ }
924
+ },
925
+ "required": [
926
+ "value"
927
+ ],
928
+ "additionalProperties": false,
929
+ "description": "The data to be used in the update."
930
+ },
931
+ "TelemetryGetMetricResponse": {
932
+ "type": "object",
933
+ "properties": {
934
+ "metric": {
935
+ "$ref": "#/components/schemas/TelemetryMetric"
936
+ },
937
+ "value": {
938
+ "$ref": "#/components/schemas/TelemetryMetricValue"
939
+ }
940
+ },
941
+ "required": [
942
+ "metric",
943
+ "value"
944
+ ],
945
+ "additionalProperties": false,
946
+ "description": "The body parameters."
947
+ },
948
+ "TelemetryListResponse": {
949
+ "type": "object",
950
+ "properties": {
951
+ "entities": {
952
+ "type": "array",
953
+ "items": {
954
+ "$ref": "#/components/schemas/TelemetryMetric"
955
+ },
956
+ "description": "The metrics."
957
+ },
958
+ "cursor": {
959
+ "type": "string",
960
+ "description": "An optional cursor, when defined can be used to call find to get more entities."
961
+ }
962
+ },
963
+ "required": [
964
+ "entities"
965
+ ],
966
+ "additionalProperties": false,
967
+ "description": "The response payload."
968
+ },
969
+ "TelemetryMetric": {
970
+ "type": "object",
971
+ "properties": {
972
+ "id": {
973
+ "type": "string",
974
+ "description": "The id of the metric."
975
+ },
976
+ "label": {
977
+ "type": "string",
978
+ "description": "The label of the metric."
979
+ },
980
+ "type": {
981
+ "$ref": "#/components/schemas/MetricType"
982
+ },
983
+ "description": {
984
+ "type": "string",
985
+ "description": "Description."
986
+ },
987
+ "unit": {
988
+ "type": "string",
989
+ "description": "The unit the metric describes."
990
+ }
991
+ },
992
+ "required": [
993
+ "id",
994
+ "label",
995
+ "type"
996
+ ],
997
+ "additionalProperties": false,
998
+ "description": "Interface describing a telemetry metric."
999
+ },
1000
+ "TelemetryMetricValue": {
1001
+ "type": "object",
1002
+ "properties": {
1003
+ "id": {
1004
+ "type": "string",
1005
+ "description": "The id of the metric value."
1006
+ },
1007
+ "ts": {
1008
+ "type": "number",
1009
+ "description": "The timestamp of the metric."
1010
+ },
1011
+ "value": {
1012
+ "type": "number",
1013
+ "description": "The value of the metric."
1014
+ },
1015
+ "customData": {
1016
+ "type": "object",
1017
+ "additionalProperties": {},
1018
+ "description": "The custom data for the metric value."
1019
+ }
1020
+ },
1021
+ "required": [
1022
+ "id",
1023
+ "ts",
1024
+ "value"
1025
+ ],
1026
+ "additionalProperties": false,
1027
+ "description": "Interface describing a telemetry metric value."
1028
+ },
1029
+ "TelemetryUpdateMetricRequest": {
1030
+ "type": "object",
1031
+ "properties": {
1032
+ "label": {
1033
+ "type": "string",
1034
+ "description": "The label of the metric."
1035
+ },
1036
+ "description": {
1037
+ "type": "string",
1038
+ "description": "The description of the metric."
1039
+ },
1040
+ "unit": {
1041
+ "type": "string",
1042
+ "description": "The unit of the metric."
1043
+ }
1044
+ },
1045
+ "required": [
1046
+ "label"
1047
+ ],
1048
+ "additionalProperties": false,
1049
+ "description": "The data to be used in the update."
1050
+ },
1051
+ "TelemetryValuesListResponse": {
1052
+ "type": "object",
1053
+ "properties": {
1054
+ "metric": {
1055
+ "$ref": "#/components/schemas/TelemetryMetric"
1056
+ },
1057
+ "entities": {
1058
+ "type": "array",
1059
+ "items": {
1060
+ "$ref": "#/components/schemas/TelemetryMetricValue"
1061
+ },
1062
+ "description": "The metric values."
1063
+ },
1064
+ "cursor": {
1065
+ "type": "string",
1066
+ "description": "An optional cursor, when defined can be used to call find to get more entities."
1067
+ }
1068
+ },
1069
+ "required": [
1070
+ "metric",
1071
+ "entities"
1072
+ ],
1073
+ "additionalProperties": false,
1074
+ "description": "The response payload."
1075
+ }
1076
+ },
1077
+ "securitySchemes": {
1078
+ "jwtBearerAuthScheme": {
1079
+ "type": "http",
1080
+ "scheme": "bearer",
1081
+ "bearerFormat": "JWT"
1082
+ }
1083
+ }
1084
+ }
1085
+ }