-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2117 lines (2037 loc) · 71.6 KB
/
Copy pathopenapi.yaml
File metadata and controls
2117 lines (2037 loc) · 71.6 KB
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
# SPDX-License-Identifier: Apache-2.0
#
# https://www.apache.org/licenses/LICENSE-2.0
openapi: 3.1.0
info:
title: Visdom API
description: >
Visdom is a flexible tool for creating, organizing, and sharing
visualizations of live, rich data. It supports Plotly-based charts,
images, text, audio, video, embeddings, and more. This specification
documents the HTTP REST endpoints exposed by the Visdom Tornado server.
All POST endpoints accept JSON request bodies (`application/json`).
When authentication is enabled, most endpoints require a valid session
cookie (set via the login endpoint at `POST /`). Unauthenticated
requests currently receive a `400` status code.
The server also supports WebSocket connections at `/socket` (read-only
subscriber) and `/vis_socket` (write-capable visualization source), as
well as HTTP polling fallbacks at `/socket_wrap` and `/vis_socket_wrap`.
version: 0.2.4
license:
name: Apache-2.0
url: https://www.apache.org/licenses/LICENSE-2.0
contact:
name: Visdom Authors
url: https://github.com/fossasia/visdom
servers:
- url: "{protocol}://{host}:{port}{base_url}"
description: Visdom server
variables:
protocol:
default: http
enum: [http, https]
host:
default: "0.0.0.0"
description: Server hostname or IP address
port:
default: "8097"
description: Server port
base_url:
default: ""
description: Optional base URL prefix (e.g., "/visdom")
tags:
- name: Visualization
description: Create and update visualization windows (panes)
- name: Window Management
description: Query, close, and retrieve window data
- name: Environment
description: Manage environments (create, delete, fork, list, save, compare)
- name: Experiments
description: Track experiment metadata (hyper-parameters, metrics, tags)
- name: Authentication
description: Login and session management
- name: Socket Polling
description: HTTP polling fallbacks for WebSocket connections
- name: System
description: Health check and diagnostics
security:
- cookieAuth: []
- {}
paths:
/events:
post:
operationId: createWindow
tags: [Visualization]
summary: Create a new visualization window
description: >
Creates a new visualization pane in the specified environment. The
window type is determined by `data[].type`. If `win` is omitted, a
new window ID is generated automatically. If `win` is provided and
already exists, the existing window is replaced.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateWindowRequest"
responses:
"200":
description: Window created successfully. Returns the window ID as plain text.
content:
text/plain:
schema:
type: string
description: The ID of the created window.
examples:
- "window_38fa9db8e4f5b2"
"400":
description: Authentication required but not provided (when login is enabled).
/update:
post:
operationId: updateWindow
tags: [Visualization]
summary: Update an existing visualization window
description: >
Updates the data, options, or layout of an existing window. Supports
appending data to scatter/line plots, updating heatmaps (append/prepend
rows or columns), appending text, managing image history, updating
embeddings selections, adding/removing traces, and modifying plot
options or layout properties. If `append` is true and the window does
not exist, a new window is created.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateWindowRequest"
responses:
"200":
description: >
Window updated successfully. Returns the window ID, or an error
message string if the window does not exist or the update is not
supported for the window type.
content:
text/plain:
schema:
type: string
examples:
success:
value: "window_38fa9db8e4f5b2"
not_found:
value: "win does not exist"
unsupported:
value: "win is not scatter, heatmap, custom, image_history, embeddings, or text; was bar"
"400":
description: Authentication required but not provided (when login is enabled).
/close:
post:
operationId: closeWindow
tags: [Window Management]
summary: Close one or all windows in an environment
description: >
Closes (deletes) a specific window or all windows in the given
environment. The close event is broadcast to all subscribed clients.
If `win` is omitted or null, all windows in the environment are
closed.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
win:
type:
- string
- "null"
description: >
Window ID to close. If null or omitted, all windows in
the environment are closed.
eid:
type:
- string
- "null"
description: >
Environment ID. Defaults to `"main"` if omitted.
responses:
"200":
description: >
Window(s) closed. A close broadcast is sent to all subscribed
clients. No body is returned.
"400":
description: Authentication required but not provided (when login is enabled).
/win_exists:
post:
operationId: checkWindowExists
tags: [Window Management]
summary: Check if a window exists in an environment
description: >
Returns `"true"` or `"false"` (as a plain text string) indicating
whether the specified window exists in the given environment.
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [win]
properties:
win:
type: string
description: Window ID to check.
eid:
type:
- string
- "null"
description: >
Environment ID. Defaults to `"main"` if omitted.
responses:
"200":
description: Returns `"true"` or `"false"` as plain text.
content:
text/plain:
schema:
type: string
enum: ["true", "false"]
"400":
description: Authentication required but not provided (when login is enabled).
/win_data:
post:
operationId: getOrSetWindowData
tags: [Window Management]
summary: Get or set raw window/environment data
description: >
When `data` is absent, retrieves the raw JSON data for a specific
window (if `win` is provided) or all windows in an environment (if
`win` is null). When `data` is present, sets (overwrites) the
window or environment data.
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/GetWindowDataRequest"
- $ref: "#/components/schemas/SetWindowDataRequest"
responses:
"200":
description: >
For GET operations: returns JSON data of the window or all
windows. For SET operations: no body, but broadcasts an
environment update.
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/WindowObject"
- type: object
additionalProperties:
$ref: "#/components/schemas/WindowObject"
description: Map of window IDs to window objects (when win is null).
"400":
description: Authentication required but not provided (when login is enabled).
"500":
description: >
Server error. Occurs if the requested window does not exist
(unhandled assertion error).
/save:
post:
operationId: saveEnvironments
tags: [Environment]
summary: Persist environments to disk
description: >
Saves the specified environments to JSON files on disk. Environment
IDs that do not exist in the current server state are silently
dropped. Returns the list of environment IDs that were actually
saved.
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [data]
properties:
data:
type: array
items:
type: string
description: List of environment IDs to save.
examples:
- ["main", "experiment_1"]
responses:
"200":
description: Returns JSON array of successfully saved environment IDs.
content:
application/json:
schema:
type: array
items:
type: string
examples:
- ["main", "experiment_1"]
"400":
description: Authentication required but not provided (when login is enabled).
/delete_env:
post:
operationId: deleteEnvironment
tags: [Environment]
summary: Delete an environment
description: >
Permanently deletes an environment and its associated JSON file on
disk. The `"main"` environment cannot be deleted (the request is
silently ignored). After deletion, an `env_update` broadcast is
sent to all subscribed clients. Handles both standard and
hash-named environment files.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
eid:
type: string
description: >
Environment ID to delete. Forward/backward slashes are
replaced with underscores.
responses:
"200":
description: >
Environment deleted (or silently ignored if `"main"`). An
`env_update` broadcast is sent. No body returned.
"400":
description: Authentication required but not provided (when login is enabled).
/env_state:
post:
operationId: listEnvironments
tags: [Environment]
summary: List all available environments
description: >
Returns a JSON array of all environment IDs currently loaded in
the server state. The request body is ignored but must be valid
JSON (an empty object `{}` is sufficient).
requestBody:
required: true
content:
application/json:
schema:
type: object
description: Request body is ignored. Send an empty object.
responses:
"200":
description: JSON array of environment IDs.
content:
application/json:
schema:
type: array
items:
type: string
examples:
- ["main", "experiment_1", "experiment_2"]
"400":
description: Authentication required but not provided (when login is enabled).
/fork_env:
post:
operationId: forkEnvironment
tags: [Environment]
summary: Clone an environment with a new ID
description: >
Deep-copies the source environment (all windows and metadata) into
a new environment with the specified ID. The forked environment is
immediately saved to disk and an `env_update` broadcast is sent.
Fails with an assertion error if the source environment does not
exist.
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [prev_eid, eid]
properties:
prev_eid:
type: string
description: Source environment ID to clone from.
eid:
type: string
description: New environment ID for the clone.
responses:
"200":
description: Returns the new environment ID as plain text.
content:
text/plain:
schema:
type: string
"400":
description: Authentication required but not provided (when login is enabled).
"500":
description: Server error. Occurs if the source environment does not exist (unhandled assertion error).
/experiments/log:
post:
operationId: logExperiment
tags: [Experiments]
summary: Record experiment metadata for an environment
description: >
Attaches experiment metadata (hyper-parameters, metric observations,
and tags) to an environment, stored under the environment's
`experiment` key and persisted through the server's data store. The
`action` field selects the operation:
- `log` (default): create or update the experiment. Repeated calls
merge new `params`/`tags` and overwrite `name`/`description`.
- `metrics`: append one or more `{name: value}` observations at an
optional `step`, creating the experiment if it does not exist yet.
- `finish`: mark the experiment terminal (`finished` or `failed`). An
experiment that is already terminal cannot be finished again.
Once an experiment is terminal, every action is rejected with `409`, so
neither a finished run's recorded data nor its final status can change
after the fact.
Every action writes, so the endpoint is rejected when the server is
running in readonly mode.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
eid:
type: string
description: Target environment ID. Defaults to `main`.
action:
type: string
enum: [log, metrics, finish]
default: log
description: Operation to perform.
name:
type: string
description: Display name (action `log`). Defaults to the eid.
description:
type: string
description: Free-form description (action `log`).
params:
type: object
additionalProperties: true
description: 'Hyper-parameters as `{name: value}` (action `log`).'
tags:
type: object
additionalProperties: true
description: 'Free-form tags as `{name: value}` (action `log`).'
metrics:
type: object
additionalProperties:
type: number
description: >
Metric observations as `{name: value}` (action `metrics`).
Must be a non-empty object.
step:
type: integer
description: Optional training step for the metrics (action `metrics`).
status:
type: string
enum: [finished, failed]
default: finished
description: Terminal status (action `finish`).
responses:
"200":
description: The stored experiment as JSON.
content:
application/json:
schema:
$ref: "#/components/schemas/Experiment"
"400":
description: >
Invalid request — unknown `action`, non-object `params`/`tags`/`metrics`,
empty `metrics`, or a non-terminal `finish` status. Also returned when
authentication is required but not provided.
"403":
description: >
Experiment logging is disabled because the server is in readonly
mode.
"404":
description: A `finish` was requested for an env that has no experiment.
"409":
description: >
A write was attempted on a terminal (finished/failed) experiment —
a `log`/`metrics` call, or a second `finish`.
/experiments/search:
post:
operationId: searchExperiments
tags: [Experiments]
summary: Search experiments across all environments
description: >
Returns the experiments matching `query`, sorted and paged. The query is
a small readable syntax of comparisons (`<`, `<=`, `>`, `>=`, `=`, `!=`,
`contains`) combined with `AND`/`OR` and parentheses, for example
`lr < 0.01 AND (acc > 0.9 OR status = finished)`. Omitting `query`
matches every experiment.
Comparison names are the experiment's built-in fields (`name`,
`status`, `created_at`, ...), its params, its metrics and its tags. A
name may be given bare (`acc`) or namespaced when it is ambiguous
(`metric.acc`, `param.lr`, `tag.owner`); metrics compare on their latest
logged value. A name no experiment has simply matches nothing.
Queries are parsed into a predicate and evaluated in Python — never
eval'd and never turned into SQL — so a hostile query is rejected as a
parse error rather than executed.
Experiments are read back through the server's data store, so a server
running with no persistence path configured has nothing to search.
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
query:
type: string
nullable: true
description: >
Filter expression. Omitted, null or blank matches every
experiment.
sort_by:
type: string
nullable: true
default: created_at
description: >
Field to sort by — any name a query can compare on.
Experiments lacking the field sort last in both directions.
descending:
type: boolean
default: true
description: Sort direction; newest/highest first by default.
limit:
type: integer
nullable: true
minimum: 0
default: 100
description: >
Maximum number of experiments in the reply. `0` returns just
the count; `null` returns all matches.
offset:
type: integer
minimum: 0
default: 0
description: Number of matches to skip before the returned page.
responses:
"200":
description: The matching page of experiments.
content:
application/json:
schema:
type: object
required: [experiments, total, limit, offset, query]
properties:
experiments:
type: array
description: One page of matching experiments.
items:
$ref: "#/components/schemas/Experiment"
total:
type: integer
description: >
Total matches for the query, ignoring `limit`/`offset`.
limit:
type: integer
nullable: true
description: The limit applied to this reply.
offset:
type: integer
description: The offset applied to this reply.
query:
type: string
description: The query used, `""` if none was given.
"400":
description: >
Invalid request — a body that is not a JSON object, malformed
`query` syntax, a non-string `query`/`sort_by`, or a `limit`/`offset`
that is not a non-negative integer. Also returned when
authentication is required but not provided.
/experiments/compare:
post:
operationId: compareExperiments
tags: [Experiments]
summary: Compare experiments field by field
description: >
Lines several experiments up beside each other and reports, per section
(params, metrics and tags), which fields they agree on and which they do
not — the short list of knobs that actually changed between runs.
The runs are named by `env_ids` and compared in the order given; every id
must have an experiment, otherwise `404`.
Finding the runs is `/experiments/search`'s job: it answers "which runs
match?", this answers "how do these runs differ?". To compare a query's
matches, search first and pass the resulting ids on.
Metrics are a time series, so a comparison uses each metric's latest
observation — the same value a search compares on.
Experiments are read back through the server's data store, so a server
running with no persistence path configured has nothing to compare.
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [env_ids]
properties:
env_ids:
type: array
minItems: 1
description: >
Environments to compare, in the order given. Duplicate ids
collapse to one.
items:
type: string
responses:
"200":
description: The comparison of the selected experiments.
content:
application/json:
schema:
type: object
required: [env_ids, experiments, params, metrics, tags]
properties:
env_ids:
type: array
description: The runs compared, in the order compared.
items:
type: string
experiments:
type: array
description: The compared experiments, in full.
items:
$ref: "#/components/schemas/Experiment"
params:
$ref: "#/components/schemas/ExperimentComparisonSection"
metrics:
$ref: "#/components/schemas/ExperimentComparisonSection"
tags:
$ref: "#/components/schemas/ExperimentComparisonSection"
"400":
description: >
Invalid request — the body is not a JSON object, or `env_ids` is
missing, empty, not a list, or holds something other than strings.
Also returned when authentication is required but not provided.
"404":
description: One or more of the given `env_ids` has no experiment.
/experiments/suggest:
post:
operationId: suggestExperiment
tags: [Experiments]
summary: Suggest parameters for the next run (reserved)
description: >
Reserved endpoint for hyper-parameter suggestion. Choosing the next set
of parameters to try is a search-strategy problem (Optuna-backed) that
lands in a later release, so this is currently a stub: it accepts the
request and replies `501 Not Implemented` with a JSON body carrying a
`suggestion: null` placeholder, rather than a made-up suggestion. The
route, the `suggest_experiment` client method and this documentation are
in place so the strategy can be wired in later without changing the
surface.
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
eid:
type: string
description: Target environment ID. Defaults to `main`.
params:
type: object
additionalProperties: true
description: >
The search space to suggest over, as `{name: spec}`. Ignored
by the stub; reserved for the eventual strategy.
responses:
"501":
description: >
Not implemented — the suggestion strategy is reserved for a later
release. The body is a JSON stub.
content:
application/json:
schema:
type: object
required: [status, detail, suggestion]
properties:
status:
type: string
example: not_implemented
detail:
type: string
suggestion:
nullable: true
description: Always `null` while the endpoint is a stub.
"400":
description: >
Invalid request — the body is present but is not valid JSON, or is
not a JSON object. Also returned when authentication is required
but not provided.
/experiments/tags:
get:
operationId: getEnvironmentTags
tags: [Experiments]
summary: Read experiment tags for environments
description: >
Returns one environment's key/value tag mapping when `eid` is supplied,
or an `{eid: {name: value}}` mapping for all tagged environments.
Tags are stored in the existing `Experiment.tags` metadata; no separate
tag index or persistence format is maintained.
parameters:
- in: query
name: eid
schema:
type: string
description: Optional environment ID.
responses:
"200":
description: One tag mapping or all environment tag mappings.
"401":
description: Authentication required but not provided.
post:
operationId: updateEnvironmentTags
tags: [Experiments]
summary: Read, replace, or append environment tags
description: >
With `action: set` (the default), replaces an environment's tags or
appends them when `append` is true. `action: get` reads the same data as
GET while allowing later clients to use the shared POST transport.
The `tags` field is required for `set`; an explicit empty object clears
the environment's tags.
Tag changes are allowed for completed experiments because they are
organizational metadata. Successful writes broadcast `tags_update` to
both WebSocket and polling browser clients.
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
action:
type: string
enum: [get, set]
default: set
eid:
type: string
description: Target environment. Defaults to `main` for set.
tags:
type: object
maxProperties: 20
description: >
Required for `action: set`. String tag names mapped to string
values. Names are limited to 50 characters by the domain
layer. An empty object explicitly clears all tags.
additionalProperties:
type: string
append:
type: boolean
default: false
responses:
"200":
description: The resulting tags, or the requested tag mapping.
"400":
description: >
Invalid action, missing or invalid tag mapping, tag limit, or append
flag.
"401":
description: Authentication required but not provided.
"403":
description: Tag writes are disabled in readonly mode.
/upload_env:
post:
operationId: uploadEnvironment
tags: [Environment]
summary: Upload a Visdom JSON file as a new environment
description: >
Accepts a Visdom environment-export JSON file via multipart form upload
and loads it as a new environment named `uploaded_<name>_<id>`. The
uploaded JSON must be an object containing `jsons` and `reload` keys.
The new environment is saved to disk (when a persistence path is
configured) and an `env_update` broadcast is sent. Maximum file size is
100 MB. Rejected when the server is running in readonly mode.
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [file]
properties:
file:
type: string
format: binary
description: >
A Visdom environment-export JSON file (object with `jsons`
and `reload` keys).
responses:
"200":
description: Environment created from the uploaded file.
content:
application/json:
schema:
type: object
required: [success, eid, message]
properties:
success:
type: boolean
eid:
type: string
description: ID of the newly created environment.
message:
type: string
examples:
uploaded:
value:
success: true
eid: uploaded_myrun_1a2b3c4d
message: "Dashboard loaded successfully as 'uploaded_myrun_1a2b3c4d'"
"400":
description: >
No file uploaded, invalid JSON, not a valid Visdom JSON, or
authentication required but not provided (when login is enabled).
content:
application/json:
schema:
$ref: "#/components/schemas/UploadErrorResponse"
"403":
description: Uploads are disabled because the server is in readonly mode.
content:
application/json:
schema:
$ref: "#/components/schemas/UploadErrorResponse"
"413":
description: Uploaded file exceeds the 100 MB size limit.
content:
application/json:
schema:
$ref: "#/components/schemas/UploadErrorResponse"
/env/{eid}:
get:
operationId: renderEnvironmentPage
tags: [Environment]
summary: Render the environment UI page
description: >
Returns the Visdom HTML page for the specified environment. This is
the main web UI entry point for a specific environment.
parameters:
- name: eid
in: path
required: true
schema:
type: string
description: Environment ID.
responses:
"200":
description: HTML page for the environment.
content:
text/html:
schema:
type: string
"400":
description: Authentication required but not provided (when login is enabled).
post:
operationId: loadEnvironment
tags: [Environment]
summary: Load environment data to a client socket or create a new environment
description: >
If `sid` is provided and matches a subscribed socket, the
environment's windows and layout are sent to that specific socket.
If `eid` is provided and does not exist, a new empty environment
is created and an `env_update` broadcast is sent.
parameters:
- name: eid
in: path
required: true
schema:
type: string
description: Environment ID (from URL path).
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
sid:
type: string
description: >
Socket ID of the subscriber to load the environment to.
eid:
type: string
description: >
Environment ID to create if it does not exist.
responses:
"200":
description: >
Environment loaded to the specified socket, or new environment
created. No body returned.
"400":
description: Authentication required but not provided (when login is enabled).
/compare/{eids}:
get:
operationId: renderComparePage
tags: [Environment]
summary: Render the comparison view for multiple environments
description: >
Returns the Visdom HTML page configured for comparing multiple
environments side by side. Windows with matching titles across
environments are combined. Plots show traces from each environment
with prefixed legend names. Images are displayed in a comparison
grid.
parameters:
- name: eids
in: path
required: true
schema:
type: string
description: >
Environment IDs separated by `+` (e.g., `env1+env2+env3`).
responses:
"200":
description: HTML page for environment comparison.
content:
text/html:
schema:
type: string
"400":
description: Authentication required but not provided (when login is enabled).
post:
operationId: loadComparisonData
tags: [Environment]
summary: Load comparison data for multiple environments to a client socket
description: >
Sends comparison window data to the specified subscriber socket.
Only windows of type `"plot"` or `"image"` with matching, non-empty
titles across at least two environments are included. Plot traces
are prefixed with the environment index. Images are shown side by
side with captioned labels.
parameters:
- name: eids
in: path
required: true
schema:
type: string
description: >
Environment IDs separated by `+` (e.g., `env1+env2+env3`).
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [sid]
properties:
sid:
type: string
description: Socket ID of the subscriber to load comparison data to.
responses:
"200":
description: >
Comparison data sent to the specified socket. No body returned.
"400":
description: Authentication required but not provided (when login is enabled).
/user/{path}:
get:
operationId: getUserSettings
tags: [System]
summary: Retrieve user settings files
description: >
Currently only supports `style.css` as the path parameter. Returns
the user's custom CSS stylesheet.
security: []
parameters:
- name: path
in: path
required: true
schema:
type: string
enum: ["style.css"]
description: Settings file path. Currently only `"style.css"` is supported.
responses:
"200":
description: User CSS content.
content: