@platformatic/watt-admin 0.1.2 → 0.3.0

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,805 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Platformatic",
5
+ "description": "This is a service built on top of Platformatic",
6
+ "version": "1.0.0"
7
+ },
8
+ "components": {
9
+ "schemas": {}
10
+ },
11
+ "paths": {
12
+ "/runtimes": {
13
+ "get": {
14
+ "parameters": [
15
+ {
16
+ "schema": {
17
+ "type": "boolean",
18
+ "default": false
19
+ },
20
+ "in": "query",
21
+ "name": "includeAdmin",
22
+ "required": false
23
+ }
24
+ ],
25
+ "responses": {
26
+ "200": {
27
+ "description": "Default Response",
28
+ "content": {
29
+ "application/json": {
30
+ "schema": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "properties": {
36
+ "pid": {
37
+ "type": "integer"
38
+ },
39
+ "cwd": {
40
+ "type": "string"
41
+ },
42
+ "argv": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "string"
46
+ }
47
+ },
48
+ "uptimeSeconds": {
49
+ "type": "number"
50
+ },
51
+ "execPath": {
52
+ "type": "string"
53
+ },
54
+ "nodeVersion": {
55
+ "type": "string"
56
+ },
57
+ "projectDir": {
58
+ "type": "string"
59
+ },
60
+ "packageName": {
61
+ "type": "string"
62
+ },
63
+ "packageVersion": {
64
+ "type": "string"
65
+ },
66
+ "url": {
67
+ "type": "string"
68
+ },
69
+ "platformaticVersion": {
70
+ "type": "string"
71
+ },
72
+ "selected": {
73
+ "type": "boolean"
74
+ }
75
+ },
76
+ "required": [
77
+ "pid",
78
+ "cwd",
79
+ "argv",
80
+ "uptimeSeconds",
81
+ "execPath",
82
+ "nodeVersion",
83
+ "projectDir",
84
+ "packageName",
85
+ "packageVersion",
86
+ "url",
87
+ "platformaticVersion",
88
+ "selected"
89
+ ]
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "/runtimes/{pid}/health": {
99
+ "get": {
100
+ "parameters": [
101
+ {
102
+ "schema": {
103
+ "type": "number"
104
+ },
105
+ "in": "path",
106
+ "name": "pid",
107
+ "required": true
108
+ }
109
+ ],
110
+ "responses": {
111
+ "200": {
112
+ "description": "Default Response",
113
+ "content": {
114
+ "application/json": {
115
+ "schema": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "properties": {
119
+ "status": {
120
+ "type": "string",
121
+ "enum": [
122
+ "OK",
123
+ "KO"
124
+ ],
125
+ "description": "Status can only be 'OK' or 'KO'"
126
+ }
127
+ },
128
+ "required": [
129
+ "status"
130
+ ]
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "/runtimes/{pid}/metrics": {
139
+ "get": {
140
+ "parameters": [
141
+ {
142
+ "schema": {
143
+ "type": "number"
144
+ },
145
+ "in": "path",
146
+ "name": "pid",
147
+ "required": true
148
+ }
149
+ ],
150
+ "responses": {
151
+ "200": {
152
+ "description": "Default Response",
153
+ "content": {
154
+ "application/json": {
155
+ "schema": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "properties": {
159
+ "dataMem": {
160
+ "type": "array",
161
+ "items": {
162
+ "type": "object",
163
+ "additionalProperties": false,
164
+ "properties": {
165
+ "date": {
166
+ "type": "string",
167
+ "format": "date-time"
168
+ },
169
+ "rss": {
170
+ "type": "number"
171
+ },
172
+ "totalHeap": {
173
+ "type": "number"
174
+ },
175
+ "usedHeap": {
176
+ "type": "number"
177
+ },
178
+ "newSpace": {
179
+ "type": "number"
180
+ },
181
+ "oldSpace": {
182
+ "type": "number"
183
+ }
184
+ },
185
+ "required": [
186
+ "date",
187
+ "rss",
188
+ "totalHeap",
189
+ "usedHeap",
190
+ "newSpace",
191
+ "oldSpace"
192
+ ]
193
+ }
194
+ },
195
+ "dataCpu": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "object",
199
+ "additionalProperties": false,
200
+ "properties": {
201
+ "date": {
202
+ "type": "string",
203
+ "format": "date-time"
204
+ },
205
+ "cpu": {
206
+ "type": "number"
207
+ },
208
+ "eventLoop": {
209
+ "type": "number"
210
+ }
211
+ },
212
+ "required": [
213
+ "date",
214
+ "cpu",
215
+ "eventLoop"
216
+ ]
217
+ }
218
+ },
219
+ "dataLatency": {
220
+ "type": "array",
221
+ "items": {
222
+ "type": "object",
223
+ "additionalProperties": false,
224
+ "properties": {
225
+ "date": {
226
+ "type": "string",
227
+ "format": "date-time"
228
+ },
229
+ "p90": {
230
+ "type": "number"
231
+ },
232
+ "p95": {
233
+ "type": "number"
234
+ },
235
+ "p99": {
236
+ "type": "number"
237
+ }
238
+ },
239
+ "required": [
240
+ "date",
241
+ "p90",
242
+ "p95",
243
+ "p99"
244
+ ]
245
+ }
246
+ },
247
+ "dataReq": {
248
+ "type": "array",
249
+ "items": {
250
+ "type": "object",
251
+ "additionalProperties": false,
252
+ "properties": {
253
+ "date": {
254
+ "type": "string",
255
+ "format": "date-time"
256
+ },
257
+ "count": {
258
+ "type": "number"
259
+ },
260
+ "rps": {
261
+ "type": "number"
262
+ }
263
+ },
264
+ "required": [
265
+ "date",
266
+ "count",
267
+ "rps"
268
+ ]
269
+ }
270
+ }
271
+ },
272
+ "required": [
273
+ "dataMem",
274
+ "dataCpu",
275
+ "dataLatency",
276
+ "dataReq"
277
+ ]
278
+ }
279
+ }
280
+ }
281
+ }
282
+ }
283
+ }
284
+ },
285
+ "/runtimes/{pid}/metrics/{serviceId}": {
286
+ "get": {
287
+ "parameters": [
288
+ {
289
+ "schema": {
290
+ "type": "number"
291
+ },
292
+ "in": "path",
293
+ "name": "pid",
294
+ "required": true
295
+ },
296
+ {
297
+ "schema": {
298
+ "type": "string"
299
+ },
300
+ "in": "path",
301
+ "name": "serviceId",
302
+ "required": true
303
+ }
304
+ ],
305
+ "responses": {
306
+ "200": {
307
+ "description": "Default Response",
308
+ "content": {
309
+ "application/json": {
310
+ "schema": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "properties": {
314
+ "dataMem": {
315
+ "type": "array",
316
+ "items": {
317
+ "type": "object",
318
+ "additionalProperties": false,
319
+ "properties": {
320
+ "date": {
321
+ "type": "string",
322
+ "format": "date-time"
323
+ },
324
+ "rss": {
325
+ "type": "number"
326
+ },
327
+ "totalHeap": {
328
+ "type": "number"
329
+ },
330
+ "usedHeap": {
331
+ "type": "number"
332
+ },
333
+ "newSpace": {
334
+ "type": "number"
335
+ },
336
+ "oldSpace": {
337
+ "type": "number"
338
+ }
339
+ },
340
+ "required": [
341
+ "date",
342
+ "rss",
343
+ "totalHeap",
344
+ "usedHeap",
345
+ "newSpace",
346
+ "oldSpace"
347
+ ]
348
+ }
349
+ },
350
+ "dataCpu": {
351
+ "type": "array",
352
+ "items": {
353
+ "type": "object",
354
+ "additionalProperties": false,
355
+ "properties": {
356
+ "date": {
357
+ "type": "string",
358
+ "format": "date-time"
359
+ },
360
+ "cpu": {
361
+ "type": "number"
362
+ },
363
+ "eventLoop": {
364
+ "type": "number"
365
+ }
366
+ },
367
+ "required": [
368
+ "date",
369
+ "cpu",
370
+ "eventLoop"
371
+ ]
372
+ }
373
+ },
374
+ "dataLatency": {
375
+ "type": "array",
376
+ "items": {
377
+ "type": "object",
378
+ "additionalProperties": false,
379
+ "properties": {
380
+ "date": {
381
+ "type": "string",
382
+ "format": "date-time"
383
+ },
384
+ "p90": {
385
+ "type": "number"
386
+ },
387
+ "p95": {
388
+ "type": "number"
389
+ },
390
+ "p99": {
391
+ "type": "number"
392
+ }
393
+ },
394
+ "required": [
395
+ "date",
396
+ "p90",
397
+ "p95",
398
+ "p99"
399
+ ]
400
+ }
401
+ },
402
+ "dataReq": {
403
+ "type": "array",
404
+ "items": {
405
+ "type": "object",
406
+ "additionalProperties": false,
407
+ "properties": {
408
+ "date": {
409
+ "type": "string",
410
+ "format": "date-time"
411
+ },
412
+ "count": {
413
+ "type": "number"
414
+ },
415
+ "rps": {
416
+ "type": "number"
417
+ }
418
+ },
419
+ "required": [
420
+ "date",
421
+ "count",
422
+ "rps"
423
+ ]
424
+ }
425
+ }
426
+ },
427
+ "required": [
428
+ "dataMem",
429
+ "dataCpu",
430
+ "dataLatency",
431
+ "dataReq"
432
+ ]
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ },
440
+ "/runtimes/{pid}/metrics/{serviceId}/{workerId}": {
441
+ "get": {
442
+ "parameters": [
443
+ {
444
+ "schema": {
445
+ "type": "number"
446
+ },
447
+ "in": "path",
448
+ "name": "pid",
449
+ "required": true
450
+ },
451
+ {
452
+ "schema": {
453
+ "type": "string"
454
+ },
455
+ "in": "path",
456
+ "name": "serviceId",
457
+ "required": true
458
+ },
459
+ {
460
+ "schema": {
461
+ "type": "number"
462
+ },
463
+ "in": "path",
464
+ "name": "workerId",
465
+ "required": true
466
+ }
467
+ ],
468
+ "responses": {
469
+ "200": {
470
+ "description": "Default Response",
471
+ "content": {
472
+ "application/json": {
473
+ "schema": {
474
+ "type": "object",
475
+ "additionalProperties": false,
476
+ "properties": {
477
+ "dataMem": {
478
+ "type": "array",
479
+ "items": {
480
+ "type": "object",
481
+ "additionalProperties": false,
482
+ "properties": {
483
+ "date": {
484
+ "type": "string",
485
+ "format": "date-time"
486
+ },
487
+ "rss": {
488
+ "type": "number"
489
+ },
490
+ "totalHeap": {
491
+ "type": "number"
492
+ },
493
+ "usedHeap": {
494
+ "type": "number"
495
+ },
496
+ "newSpace": {
497
+ "type": "number"
498
+ },
499
+ "oldSpace": {
500
+ "type": "number"
501
+ }
502
+ },
503
+ "required": [
504
+ "date",
505
+ "rss",
506
+ "totalHeap",
507
+ "usedHeap",
508
+ "newSpace",
509
+ "oldSpace"
510
+ ]
511
+ }
512
+ },
513
+ "dataCpu": {
514
+ "type": "array",
515
+ "items": {
516
+ "type": "object",
517
+ "additionalProperties": false,
518
+ "properties": {
519
+ "date": {
520
+ "type": "string",
521
+ "format": "date-time"
522
+ },
523
+ "cpu": {
524
+ "type": "number"
525
+ },
526
+ "eventLoop": {
527
+ "type": "number"
528
+ }
529
+ },
530
+ "required": [
531
+ "date",
532
+ "cpu",
533
+ "eventLoop"
534
+ ]
535
+ }
536
+ },
537
+ "dataLatency": {
538
+ "type": "array",
539
+ "items": {
540
+ "type": "object",
541
+ "additionalProperties": false,
542
+ "properties": {
543
+ "date": {
544
+ "type": "string",
545
+ "format": "date-time"
546
+ },
547
+ "p90": {
548
+ "type": "number"
549
+ },
550
+ "p95": {
551
+ "type": "number"
552
+ },
553
+ "p99": {
554
+ "type": "number"
555
+ }
556
+ },
557
+ "required": [
558
+ "date",
559
+ "p90",
560
+ "p95",
561
+ "p99"
562
+ ]
563
+ }
564
+ },
565
+ "dataReq": {
566
+ "type": "array",
567
+ "items": {
568
+ "type": "object",
569
+ "additionalProperties": false,
570
+ "properties": {
571
+ "date": {
572
+ "type": "string",
573
+ "format": "date-time"
574
+ },
575
+ "count": {
576
+ "type": "number"
577
+ },
578
+ "rps": {
579
+ "type": "number"
580
+ }
581
+ },
582
+ "required": [
583
+ "date",
584
+ "count",
585
+ "rps"
586
+ ]
587
+ }
588
+ }
589
+ },
590
+ "required": [
591
+ "dataMem",
592
+ "dataCpu",
593
+ "dataLatency",
594
+ "dataReq"
595
+ ]
596
+ }
597
+ }
598
+ }
599
+ }
600
+ }
601
+ }
602
+ },
603
+ "/runtimes/{pid}/services": {
604
+ "get": {
605
+ "parameters": [
606
+ {
607
+ "schema": {
608
+ "type": "number"
609
+ },
610
+ "in": "path",
611
+ "name": "pid",
612
+ "required": true
613
+ }
614
+ ],
615
+ "responses": {
616
+ "200": {
617
+ "description": "Default Response",
618
+ "content": {
619
+ "application/json": {
620
+ "schema": {
621
+ "type": "object",
622
+ "additionalProperties": false,
623
+ "required": [
624
+ "entrypoint",
625
+ "production",
626
+ "services"
627
+ ],
628
+ "properties": {
629
+ "entrypoint": {
630
+ "type": "string"
631
+ },
632
+ "production": {
633
+ "type": "boolean"
634
+ },
635
+ "services": {
636
+ "type": "array",
637
+ "items": {
638
+ "anyOf": [
639
+ {
640
+ "type": "object",
641
+ "required": [
642
+ "id",
643
+ "type",
644
+ "status",
645
+ "version",
646
+ "localUrl",
647
+ "entrypoint",
648
+ "dependencies"
649
+ ],
650
+ "properties": {
651
+ "id": {
652
+ "type": "string"
653
+ },
654
+ "type": {
655
+ "type": "string"
656
+ },
657
+ "status": {
658
+ "type": "string"
659
+ },
660
+ "version": {
661
+ "type": "string"
662
+ },
663
+ "localUrl": {
664
+ "type": "string"
665
+ },
666
+ "entrypoint": {
667
+ "type": "boolean"
668
+ },
669
+ "workers": {
670
+ "type": "number"
671
+ },
672
+ "url": {
673
+ "type": "string"
674
+ },
675
+ "dependencies": {
676
+ "type": "array",
677
+ "items": {
678
+ "type": "object",
679
+ "required": [
680
+ "id",
681
+ "url",
682
+ "local"
683
+ ],
684
+ "properties": {
685
+ "id": {
686
+ "type": "string"
687
+ },
688
+ "url": {
689
+ "type": "string"
690
+ },
691
+ "local": {
692
+ "type": "boolean"
693
+ }
694
+ }
695
+ }
696
+ }
697
+ }
698
+ },
699
+ {
700
+ "type": "object",
701
+ "required": [
702
+ "id",
703
+ "status"
704
+ ],
705
+ "properties": {
706
+ "id": {
707
+ "type": "string"
708
+ },
709
+ "status": {
710
+ "type": "string"
711
+ }
712
+ }
713
+ }
714
+ ]
715
+ }
716
+ }
717
+ }
718
+ }
719
+ }
720
+ }
721
+ }
722
+ }
723
+ }
724
+ },
725
+ "/runtimes/{pid}/logs": {
726
+ "get": {
727
+ "parameters": [
728
+ {
729
+ "schema": {
730
+ "type": "number"
731
+ },
732
+ "in": "path",
733
+ "name": "pid",
734
+ "required": true
735
+ }
736
+ ],
737
+ "responses": {
738
+ "200": {
739
+ "description": "Default Response"
740
+ }
741
+ }
742
+ }
743
+ },
744
+ "/runtimes/{pid}/openapi/{serviceId}": {
745
+ "get": {
746
+ "parameters": [
747
+ {
748
+ "schema": {
749
+ "type": "number"
750
+ },
751
+ "in": "path",
752
+ "name": "pid",
753
+ "required": true
754
+ },
755
+ {
756
+ "schema": {
757
+ "type": "string"
758
+ },
759
+ "in": "path",
760
+ "name": "serviceId",
761
+ "required": true
762
+ }
763
+ ],
764
+ "responses": {
765
+ "200": {
766
+ "description": "Default Response"
767
+ }
768
+ }
769
+ }
770
+ },
771
+ "/runtimes/{pid}/restart": {
772
+ "post": {
773
+ "requestBody": {
774
+ "content": {
775
+ "application/json": {
776
+ "schema": {
777
+ "type": "object"
778
+ }
779
+ }
780
+ }
781
+ },
782
+ "parameters": [
783
+ {
784
+ "schema": {
785
+ "type": "number"
786
+ },
787
+ "in": "path",
788
+ "name": "pid",
789
+ "required": true
790
+ }
791
+ ],
792
+ "responses": {
793
+ "200": {
794
+ "description": "Default Response"
795
+ }
796
+ }
797
+ }
798
+ }
799
+ },
800
+ "servers": [
801
+ {
802
+ "url": "/"
803
+ }
804
+ ]
805
+ }