@platformatic/watt-admin 0.1.2 → 0.2.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,591 @@
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
+ "properties": {
35
+ "pid": {
36
+ "type": "integer"
37
+ },
38
+ "cwd": {
39
+ "type": "string"
40
+ },
41
+ "argv": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "string"
45
+ }
46
+ },
47
+ "uptimeSeconds": {
48
+ "type": "number"
49
+ },
50
+ "execPath": {
51
+ "type": "string"
52
+ },
53
+ "nodeVersion": {
54
+ "type": "string"
55
+ },
56
+ "projectDir": {
57
+ "type": "string"
58
+ },
59
+ "packageName": {
60
+ "type": "string"
61
+ },
62
+ "packageVersion": {
63
+ "type": "string"
64
+ },
65
+ "url": {
66
+ "type": "string"
67
+ },
68
+ "platformaticVersion": {
69
+ "type": "string"
70
+ },
71
+ "selected": {
72
+ "type": "boolean"
73
+ }
74
+ },
75
+ "required": [
76
+ "pid",
77
+ "cwd",
78
+ "argv",
79
+ "uptimeSeconds",
80
+ "execPath",
81
+ "nodeVersion",
82
+ "projectDir",
83
+ "packageName",
84
+ "packageVersion",
85
+ "url",
86
+ "platformaticVersion",
87
+ "selected"
88
+ ]
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ },
97
+ "/runtimes/{pid}/metrics": {
98
+ "get": {
99
+ "parameters": [
100
+ {
101
+ "schema": {
102
+ "type": "number"
103
+ },
104
+ "in": "path",
105
+ "name": "pid",
106
+ "required": true
107
+ }
108
+ ],
109
+ "responses": {
110
+ "200": {
111
+ "description": "Default Response",
112
+ "content": {
113
+ "application/json": {
114
+ "schema": {
115
+ "type": "object",
116
+ "properties": {
117
+ "dataMem": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "object",
121
+ "properties": {
122
+ "date": {
123
+ "type": "string",
124
+ "format": "date-time"
125
+ },
126
+ "rss": {
127
+ "type": "number"
128
+ },
129
+ "totalHeap": {
130
+ "type": "number"
131
+ },
132
+ "usedHeap": {
133
+ "type": "number"
134
+ },
135
+ "newSpace": {
136
+ "type": "number"
137
+ },
138
+ "oldSpace": {
139
+ "type": "number"
140
+ }
141
+ },
142
+ "required": [
143
+ "date",
144
+ "rss",
145
+ "totalHeap",
146
+ "usedHeap",
147
+ "newSpace",
148
+ "oldSpace"
149
+ ]
150
+ }
151
+ },
152
+ "dataCpu": {
153
+ "type": "array",
154
+ "items": {
155
+ "type": "object",
156
+ "properties": {
157
+ "date": {
158
+ "type": "string",
159
+ "format": "date-time"
160
+ },
161
+ "cpu": {
162
+ "type": "number"
163
+ },
164
+ "eventLoop": {
165
+ "type": "number"
166
+ }
167
+ },
168
+ "required": [
169
+ "date",
170
+ "cpu",
171
+ "eventLoop"
172
+ ]
173
+ }
174
+ },
175
+ "dataLatency": {
176
+ "type": "array",
177
+ "items": {
178
+ "type": "object",
179
+ "properties": {
180
+ "date": {
181
+ "type": "string",
182
+ "format": "date-time"
183
+ },
184
+ "p90": {
185
+ "type": "number"
186
+ },
187
+ "p95": {
188
+ "type": "number"
189
+ },
190
+ "p99": {
191
+ "type": "number"
192
+ }
193
+ },
194
+ "required": [
195
+ "date",
196
+ "p90",
197
+ "p95",
198
+ "p99"
199
+ ]
200
+ }
201
+ },
202
+ "dataReq": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "object",
206
+ "properties": {
207
+ "date": {
208
+ "type": "string",
209
+ "format": "date-time"
210
+ },
211
+ "count": {
212
+ "type": "number"
213
+ },
214
+ "rps": {
215
+ "type": "number"
216
+ }
217
+ },
218
+ "required": [
219
+ "date",
220
+ "count",
221
+ "rps"
222
+ ]
223
+ }
224
+ }
225
+ },
226
+ "required": [
227
+ "dataMem",
228
+ "dataCpu",
229
+ "dataLatency",
230
+ "dataReq"
231
+ ]
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }
238
+ },
239
+ "/runtimes/{pid}/metrics/{serviceId}": {
240
+ "get": {
241
+ "parameters": [
242
+ {
243
+ "schema": {
244
+ "type": "number"
245
+ },
246
+ "in": "path",
247
+ "name": "pid",
248
+ "required": true
249
+ },
250
+ {
251
+ "schema": {
252
+ "type": "string"
253
+ },
254
+ "in": "path",
255
+ "name": "serviceId",
256
+ "required": true
257
+ }
258
+ ],
259
+ "responses": {
260
+ "200": {
261
+ "description": "Default Response",
262
+ "content": {
263
+ "application/json": {
264
+ "schema": {
265
+ "type": "object",
266
+ "properties": {
267
+ "dataMem": {
268
+ "type": "array",
269
+ "items": {
270
+ "type": "object",
271
+ "properties": {
272
+ "date": {
273
+ "type": "string",
274
+ "format": "date-time"
275
+ },
276
+ "rss": {
277
+ "type": "number"
278
+ },
279
+ "totalHeap": {
280
+ "type": "number"
281
+ },
282
+ "usedHeap": {
283
+ "type": "number"
284
+ },
285
+ "newSpace": {
286
+ "type": "number"
287
+ },
288
+ "oldSpace": {
289
+ "type": "number"
290
+ }
291
+ },
292
+ "required": [
293
+ "date",
294
+ "rss",
295
+ "totalHeap",
296
+ "usedHeap",
297
+ "newSpace",
298
+ "oldSpace"
299
+ ]
300
+ }
301
+ },
302
+ "dataCpu": {
303
+ "type": "array",
304
+ "items": {
305
+ "type": "object",
306
+ "properties": {
307
+ "date": {
308
+ "type": "string",
309
+ "format": "date-time"
310
+ },
311
+ "cpu": {
312
+ "type": "number"
313
+ },
314
+ "eventLoop": {
315
+ "type": "number"
316
+ }
317
+ },
318
+ "required": [
319
+ "date",
320
+ "cpu",
321
+ "eventLoop"
322
+ ]
323
+ }
324
+ },
325
+ "dataLatency": {
326
+ "type": "array",
327
+ "items": {
328
+ "type": "object",
329
+ "properties": {
330
+ "date": {
331
+ "type": "string",
332
+ "format": "date-time"
333
+ },
334
+ "p90": {
335
+ "type": "number"
336
+ },
337
+ "p95": {
338
+ "type": "number"
339
+ },
340
+ "p99": {
341
+ "type": "number"
342
+ }
343
+ },
344
+ "required": [
345
+ "date",
346
+ "p90",
347
+ "p95",
348
+ "p99"
349
+ ]
350
+ }
351
+ },
352
+ "dataReq": {
353
+ "type": "array",
354
+ "items": {
355
+ "type": "object",
356
+ "properties": {
357
+ "date": {
358
+ "type": "string",
359
+ "format": "date-time"
360
+ },
361
+ "count": {
362
+ "type": "number"
363
+ },
364
+ "rps": {
365
+ "type": "number"
366
+ }
367
+ },
368
+ "required": [
369
+ "date",
370
+ "count",
371
+ "rps"
372
+ ]
373
+ }
374
+ }
375
+ },
376
+ "required": [
377
+ "dataMem",
378
+ "dataCpu",
379
+ "dataLatency",
380
+ "dataReq"
381
+ ]
382
+ }
383
+ }
384
+ }
385
+ }
386
+ }
387
+ }
388
+ },
389
+ "/runtimes/{pid}/services": {
390
+ "get": {
391
+ "parameters": [
392
+ {
393
+ "schema": {
394
+ "type": "number"
395
+ },
396
+ "in": "path",
397
+ "name": "pid",
398
+ "required": true
399
+ }
400
+ ],
401
+ "responses": {
402
+ "200": {
403
+ "description": "Default Response",
404
+ "content": {
405
+ "application/json": {
406
+ "schema": {
407
+ "type": "object",
408
+ "additionalProperties": false,
409
+ "required": [
410
+ "entrypoint",
411
+ "production",
412
+ "services"
413
+ ],
414
+ "properties": {
415
+ "entrypoint": {
416
+ "type": "string"
417
+ },
418
+ "production": {
419
+ "type": "boolean"
420
+ },
421
+ "services": {
422
+ "type": "array",
423
+ "items": {
424
+ "anyOf": [
425
+ {
426
+ "type": "object",
427
+ "required": [
428
+ "id",
429
+ "type",
430
+ "status",
431
+ "version",
432
+ "localUrl",
433
+ "entrypoint",
434
+ "dependencies"
435
+ ],
436
+ "properties": {
437
+ "id": {
438
+ "type": "string"
439
+ },
440
+ "type": {
441
+ "type": "string"
442
+ },
443
+ "status": {
444
+ "type": "string"
445
+ },
446
+ "version": {
447
+ "type": "string"
448
+ },
449
+ "localUrl": {
450
+ "type": "string"
451
+ },
452
+ "entrypoint": {
453
+ "type": "boolean"
454
+ },
455
+ "workers": {
456
+ "type": "number"
457
+ },
458
+ "url": {
459
+ "type": "string"
460
+ },
461
+ "dependencies": {
462
+ "type": "array",
463
+ "items": {
464
+ "type": "object",
465
+ "required": [
466
+ "id",
467
+ "url",
468
+ "local"
469
+ ],
470
+ "properties": {
471
+ "id": {
472
+ "type": "string"
473
+ },
474
+ "url": {
475
+ "type": "string"
476
+ },
477
+ "local": {
478
+ "type": "boolean"
479
+ }
480
+ }
481
+ }
482
+ }
483
+ }
484
+ },
485
+ {
486
+ "type": "object",
487
+ "required": [
488
+ "id",
489
+ "status"
490
+ ],
491
+ "properties": {
492
+ "id": {
493
+ "type": "string"
494
+ },
495
+ "status": {
496
+ "type": "string"
497
+ }
498
+ }
499
+ }
500
+ ]
501
+ }
502
+ }
503
+ }
504
+ }
505
+ }
506
+ }
507
+ }
508
+ }
509
+ }
510
+ },
511
+ "/runtimes/{pid}/logs": {
512
+ "get": {
513
+ "parameters": [
514
+ {
515
+ "schema": {
516
+ "type": "number"
517
+ },
518
+ "in": "path",
519
+ "name": "pid",
520
+ "required": true
521
+ }
522
+ ],
523
+ "responses": {
524
+ "200": {
525
+ "description": "Default Response"
526
+ }
527
+ }
528
+ }
529
+ },
530
+ "/runtimes/{pid}/openapi/{serviceId}": {
531
+ "get": {
532
+ "parameters": [
533
+ {
534
+ "schema": {
535
+ "type": "number"
536
+ },
537
+ "in": "path",
538
+ "name": "pid",
539
+ "required": true
540
+ },
541
+ {
542
+ "schema": {
543
+ "type": "string"
544
+ },
545
+ "in": "path",
546
+ "name": "serviceId",
547
+ "required": true
548
+ }
549
+ ],
550
+ "responses": {
551
+ "200": {
552
+ "description": "Default Response"
553
+ }
554
+ }
555
+ }
556
+ },
557
+ "/runtimes/{pid}/restart": {
558
+ "post": {
559
+ "requestBody": {
560
+ "content": {
561
+ "application/json": {
562
+ "schema": {
563
+ "type": "object"
564
+ }
565
+ }
566
+ }
567
+ },
568
+ "parameters": [
569
+ {
570
+ "schema": {
571
+ "type": "number"
572
+ },
573
+ "in": "path",
574
+ "name": "pid",
575
+ "required": true
576
+ }
577
+ ],
578
+ "responses": {
579
+ "200": {
580
+ "description": "Default Response"
581
+ }
582
+ }
583
+ }
584
+ }
585
+ },
586
+ "servers": [
587
+ {
588
+ "url": "/"
589
+ }
590
+ ]
591
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/service/2.55.0.json",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/service/2.57.0.json",
3
3
  "service": {
4
4
  "openapi": true
5
5
  },
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/composer/2.55.0.json",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/composer/2.57.0.json",
3
3
  "composer": {
4
4
  "services": [
5
5
  {