Repository navigation
Expand file tree
/
Copy pathenvironment.yaml
More file actions
1866 lines (1864 loc) · 71.1 KB
/
Copy pathenvironment.yaml
File metadata and controls
1866 lines (1864 loc) · 71.1 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
openapi: "3.1.0"
info:
title: ADX Environment Management API
version: "1.0.0"
license:
name: Apache-2.0
identifier: Apache-2.0
description: |
Public lifecycle API implemented by the Rust API Server and exposed through
Ingress. Environment is the public API and SDK model as well as the logical execution
identity used internally. Runtime represents a physical execution. The public
environmentId field maps to environment_id at the API Server boundary.
Lifecycle responses use an envelope whose `data` member is base64-encoded
JSON. Resource discovery returns its typed JSON document directly. Create
can return Server-Sent Events when requested by the client.
Environment creation accepts env.ADX_TOKEN for the workload. API-key
authentication determines the request identity and tenant. Other reserved
environment keys are rejected.
servers:
- url: https://{address}
variables:
address:
default: adx.example.com
security:
- bearerAuth: []
- xAuth: []
tags:
- name: Environments
description: Public Environment lifecycle and current execution view.
- name: Resources
description: Current online node capacity and admission status exposed to the Environment SDK.
- name: Scheduler compatibility
description: Administrator compatibility surface for established scheduler operations.
- name: API Keys
description: Administrator-only tenant key creation, listing and revocation.
- name: Snapshots
description: Tenant-scoped reusable checkpoint catalog.
paths:
/api/admin/v1/keys:
post:
tags:
- API Keys
operationId: createTenantKey
summary: Create a tenant API Key (administrator only)
description: Returns plaintext apiKey once. The key id is a SHA256 identifier and cannot authenticate requests.
Expiry zero or omitted means no expiry; a positive expiry must be in the future. Caller tenant headers cannot
elevate privileges.
parameters:
- $ref: '#/components/parameters/RequestId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTenantKeyRequest'
responses:
'201':
description: Metadata and the one-time plaintext key; no lifecycle envelope.
headers:
Cache-Control:
description: Key responses must not be cached.
schema:
type: string
const: no-store
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedTenantKey'
'403':
$ref: '#/components/responses/Error'
default:
$ref: '#/components/responses/Error'
get:
tags:
- API Keys
operationId: listTenantKeys
summary: List tenant key metadata (administrator only)
description: Never returns plaintext keys. Use id for revocation and the original apiKey for SDK authentication.
parameters:
- name: tenantId
in: query
schema:
type: string
description: Optional tenant filter; omitted or empty selects all tenants.
- name: pageSize
in: query
schema:
type: integer
minimum: 1
maximum: 1000
default: 100
- name: pageToken
in: query
schema:
type: string
description: Opaque cursor from nextPageToken.
responses:
'200':
description: Paginated metadata; no lifecycle envelope.
headers:
Cache-Control:
description: Key responses must not be cached.
schema:
type: string
const: no-store
content:
application/json:
schema:
$ref: '#/components/schemas/TenantKeyList'
'403':
$ref: '#/components/responses/Error'
default:
$ref: '#/components/responses/Error'
/api/admin/v1/keys/{id}:
delete:
tags:
- API Keys
operationId: revokeTenantKey
summary: Revoke a tenant API Key (administrator only)
description: Idempotent revocation; already revoked or absent returns 204. Authentication-cache propagation
follows the configured cache lifetime.
parameters:
- name: id
in: path
required: true
schema:
type: string
minLength: 1
description: Key identifier, not the plaintext apiKey.
responses:
'204':
description: Revoked; empty response body.
headers:
Cache-Control:
description: Key responses must not be cached.
schema:
type: string
const: no-store
'403':
$ref: '#/components/responses/Error'
default:
$ref: '#/components/responses/Error'
/api/environment/v1/capabilities:
get:
tags: [Environments]
operationId: getEnvironmentCapabilities
summary: Query supported environment management capabilities
responses:
"200":
description: Authenticated capability document without an envelope.
content:
application/json:
schema:
type: object
required: [capabilities]
properties:
capabilities:
type: array
items: {type: string}
example: {capabilities: [workload-probes-v1]}
default: {$ref: "#/components/responses/Error"}
/global-scheduler/resources:
get:
tags: [Scheduler compatibility]
operationId: listLegacySchedulerResources
summary: List online node resources using the legacy-compatible path
description: |
Capacity and allocatable totals include only online nodes accepting
new allocations. Online nodes with admission disabled remain in
resource.fragment with status 1, zero CPU/Memory/Disk capacity and
allocatable values, and no GPU/NPU resource entries. This is a scheduling
view; disabling admission does not release existing allocations or
erase the Coordinator's underlying capacity and allocation ledger.
responses:
"200":
description: Current node capacity, allocatable resources and admission status.
content:
application/json:
schema: {$ref: "#/components/schemas/LegacyResourceResponse"}
default: {$ref: "#/components/responses/Error"}
/global-scheduler/scheduling_queue:
get:
tags: [Scheduler compatibility]
operationId: listLegacySchedulingQueue
summary: List requests waiting in the in-memory ShardScheduler queues
description: Administrator only. Assigned Environments are not included.
responses:
"200":
description: Bounded waiting-request view.
content:
application/json:
schema: {$ref: "#/components/schemas/SchedulingQueue"}
default: {$ref: "#/components/responses/Error"}
/global-scheduler/node/localschedulingstatus:
parameters:
- name: node_id
in: query
required: true
schema: {type: string, minLength: 1}
post:
tags: [Scheduler compatibility]
operationId: pauseNodeScheduling
summary: Stop new scheduling to one node
description: Administrator only. Existing Environments continue running.
responses:
"200":
description: Node admission is administratively paused.
content:
application/json:
schema: {$ref: "#/components/schemas/NodeSchedulingStatus"}
default: {$ref: "#/components/responses/Error"}
delete:
tags: [Scheduler compatibility]
operationId: resumeNodeScheduling
summary: Remove the administrative scheduling pause from one node
description: Administrator only. Local pressure and reconciliation can still keep admission closed.
responses:
"200":
description: Administrative pause is removed.
content:
application/json:
schema: {$ref: "#/components/schemas/NodeSchedulingStatus"}
default: {$ref: "#/components/responses/Error"}
/api/environment/v1/resources:
get:
tags: [Resources]
operationId: listEnvironmentResources
summary: List current online node resources and admission status
description: |
Returns the API Server's fresh in-memory node directory, including
online nodes whose new-allocation admission is paused. The directory
is initialized by a complete Coordinator watch frame and then refreshed by
subsequent frames; an expired or unavailable view returns an error
instead of stale capacity. CPU is reported in millicores and Memory and
Disk in MiB. Nodes with admission disabled retain their identity,
labels and status 1, but report zero CPU/Memory/Disk capacity and
allocatable values and no GPU/NPU resource entries. This is a scheduling
view, not rated physical capacity or actual utilization. Existing
allocations and the Coordinator's underlying resource ledger are retained.
responses:
"200":
description: Current node capacity, allocatable resources and admission status.
content:
application/json:
schema:
$ref: "#/components/schemas/NodeResourceList"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/environments:
post:
tags: [Environments]
operationId: createEnvironment
summary: Create a Environment
description: |
`X-Request-Id` identifies one logical create. A retry must retain both
that ID and the same request body. With `Accept: text/event-stream`, an
`accepted` event is followed by heartbeats and one authoritative `final`
event.
parameters:
- $ref: "#/components/parameters/RequestId"
- name: Accept
in: header
required: false
schema:
type: string
enum: [application/json, text/event-stream]
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateEnvironmentRequest"
responses:
"200":
description: Created, or an SSE stream whose final event reports the outcome.
headers:
X-Request-Id:
$ref: "#/components/headers/RequestId"
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- $ref: "#/components/schemas/CreateEnvironmentEnvelopeData"
text/event-stream:
schema:
type: string
example: |-
event: accepted
data: {"status":"creating","requestId":"create-01"}
event: final
data: {"status":"running","environmentId":"demo","requestId":"create-01"}
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/instances:
get:
tags: [Environments]
operationId: listEnvironments
summary: List caller-visible Environments, or query one by ID
description: >-
Without instance_id, returns a bounded page of caller-visible instances
from the synchronized directory; administrators can see every tenant.
With instance_id, returns one view in an array and falls back to a read-only
Coordinator lookup when the API directory has no entry or is not synchronized.
Tenant authorization applies to both cached and Coordinator results.
Every view includes placement, runtime class, revision and restart evidence.
Administrator queries by ID additionally include execution configuration
(mounts, probes and process) and env_vars, which can contain credentials.
Lists and ordinary tenant queries omit these configuration fields.
Queries by ID use Cache-Control: no-store. No lifecycle operation is acquired.
Deleted or absent IDs return 404; lists omit tombstones.
parameters:
- name: instance_id
in: query
required: false
schema:
type: string
minLength: 1
- name: pageSize
in: query
schema: {type: integer, minimum: 1, maximum: 1000, default: 100}
description: Page size for list queries without instance_id.
- name: pageToken
in: query
schema: {type: string}
description: Opaque cursor from the previous page, bound to the caller scope.
responses:
"200":
description: Paged Environment views, or a one-element array with instance_id.
content:
application/json:
schema:
oneOf:
- type: array
items:
$ref: "#/components/schemas/InstanceView"
- type: object
required: [items, nextPageToken]
properties:
items:
type: array
items:
$ref: "#/components/schemas/InstanceView"
nextPageToken:
type: string
description: Empty on the last page.
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/environments/{environmentId}:
delete:
tags: [Environments]
operationId: deleteEnvironment
summary: Delete a Environment
parameters:
- $ref: "#/components/parameters/EnvironmentId"
- $ref: "#/components/parameters/RequestId"
responses:
"200":
description: Delete result in the standard envelope.
content:
application/json:
schema:
$ref: "#/components/schemas/Envelope"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/environments/{environmentId}/stop:
post:
tags: [Environments]
operationId: stopEnvironment
summary: Stop a specific worker assignment and return its teardown receipt
description: |
Use the current assignment generation and a stable X-Request-Id. A successful
response confirms that the worker published a deleted record for that assignment
and released its resources. A stale generation or an unavailable worker leaves
the stop unconfirmed.
parameters:
- $ref: "#/components/parameters/EnvironmentId"
- $ref: "#/components/parameters/RequestId"
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [generation]
properties:
generation: {$ref: "#/components/schemas/AssignmentGeneration"}
responses:
"200":
description: The decoded receipt identifies the stopped assignment and the request.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- type: object
properties:
data:
type: string
contentEncoding: base64
contentMediaType: application/json
contentSchema: {$ref: "#/components/schemas/StopReceipt"}
"409":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/environments/{environmentId}/pause:
post:
tags: [Environments]
operationId: pauseEnvironment
summary: Pause a Environment and publish its restore point
parameters:
- $ref: "#/components/parameters/EnvironmentId"
- $ref: "#/components/parameters/PauseOperationId"
requestBody:
required: false
content:
application/json:
schema:
$ref: "#/components/schemas/PauseRequest"
responses:
"200":
description: >-
Restore point metadata is committed. With local storage the complete
artifact is readable on its owning node, without an adxlet fsync
barrier or a host-crash durability guarantee. With object storage,
artifact upload is complete before success is returned.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- $ref: "#/components/schemas/PauseEnvelopeData"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/environments/{environmentId}/resume:
post:
tags: [Environments]
operationId: resumeEnvironment
summary: Resume a paused Environment
description: |
Manual resume accepts both manually and idle-automatically paused Environments.
Authorized business traffic also resumes either kind through the same
Coordinator entry without an auto-resume switch. Concurrent manual and
traffic-triggered demands share one durable restore intent. A valid,
unexpired checkpoint is required; local-only points require the owning node.
Health, metrics and passive subscriptions do not trigger resume.
parameters:
- $ref: "#/components/parameters/EnvironmentId"
- $ref: "#/components/parameters/ResumeOperationId"
responses:
"200":
description: The Environment Environment is running and its local Runtime route is bound.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- $ref: "#/components/schemas/ResumeEnvelopeData"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/environments/{environmentId}/reload:
post:
tags: [Environments]
operationId: reloadEnvironment
summary: Replace a running execution from its latest retained restore point
description: |
The logical Environment ID, node ownership and generation stay unchanged.
No image fallback occurs when the restore point is missing or unusable.
parameters:
- $ref: "#/components/parameters/EnvironmentId"
- $ref: "#/components/parameters/ReloadOperationId"
responses:
"200":
description: The replacement execution is ready, routed and committed.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- $ref: "#/components/schemas/SuccessEnvelopeData"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/environments/{environmentId}/network:
put:
tags: [Environments]
operationId: updateEnvironmentNetworkPolicy
summary: Atomically replace the complete runtime network policy
description: An empty object clears the policy. The committed Environment specification changes only after sandboxd accepts the replacement Runtime.
parameters:
- $ref: "#/components/parameters/EnvironmentId"
- $ref: "#/components/parameters/NetworkOperationId"
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/NetworkPolicy"
- type: object
maxProperties: 0
responses:
"200":
description: Policy replacement is applied and committed.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- $ref: "#/components/schemas/SuccessEnvelopeData"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/environments/{environmentId}/snapshots:
post:
tags: [Snapshots]
operationId: createSnapshot
summary: Create a reusable snapshot and resume the source Environment
parameters:
- $ref: "#/components/parameters/EnvironmentId"
- $ref: "#/components/parameters/SnapshotOperationId"
requestBody:
required: false
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSnapshotRequest"
responses:
"200":
description: Snapshot and resumed source state are committed.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- $ref: "#/components/schemas/CreateSnapshotEnvelopeData"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/snapshot-references/{snapshotId}:
put:
tags: [Snapshots]
operationId: updateAgentSnapshotReference
summary: Register or release a Catalog owner or retire a Golden
parameters:
- {name: snapshotId, in: path, required: true, schema: {type: string}}
- {name: x-adx-agent-authorization, in: header, required: true, schema: {type: string}}
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- type: object
additionalProperties: false
required: [operation, owner]
properties:
operation: {type: string, enum: [release]}
owner:
oneOf:
- type: object
additionalProperties: false
required: [kind, name, version]
properties:
kind: {type: string, enum: [template]}
name: {type: string}
version: {type: string}
- type: object
additionalProperties: false
required: [kind, binding_id, environment_id]
properties:
kind: {type: string, enum: [binding]}
binding_id: {type: string}
environment_id: {type: string}
- type: object
additionalProperties: false
required: [operation, owner]
properties:
operation: {type: string, enum: [acquire]}
owner:
type: object
additionalProperties: false
required: [kind, name, version]
properties:
kind: {type: string, enum: [template]}
name: {type: string}
version: {type: string}
- type: object
required: [operation, owner, revision]
additionalProperties: false
properties:
operation: {type: string, enum: [acquire_binding, cancel_pending]}
revision: {type: integer, format: int64, minimum: 1}
owner:
type: object
required: [kind, binding_id, environment_id]
additionalProperties: false
properties:
kind: {type: string, enum: [binding]}
binding_id: {type: string}
environment_id: {type: string}
- type: object
additionalProperties: false
required: [operation]
properties:
operation: {type: string, enum: [retire]}
responses:
"200": {description: Reference operation applied}
"409": {$ref: "#/components/responses/Error"}
default: {$ref: "#/components/responses/Error"}
/api/environment/v1/snapshot-preparations/{preparationId}:
put:
tags: [Snapshots]
operationId: prepareSnapshot
summary: Ensure a fixed asynchronous Golden preparation
description: Replay the same UUID and input after transport ambiguity. The caller supplies an anonymous seed.
parameters:
- name: preparationId
in: path
required: true
schema: {type: string, format: uuid}
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [environment, volume]
properties:
registration_deadline_unix_ms:
type: integer
format: int64
minimum: 0
description: "Unix milliseconds. Rejects first registration at or after this time. Existing registrations can be reconciled."
environment: {$ref: "#/components/schemas/CreateEnvironmentRequest"}
volume:
type: object
additionalProperties: false
required: [id, source, access_mode, create_if_missing]
properties:
id: {type: string, description: "Must be adx-agent-seed-{preparationId}."}
source:
type: object
additionalProperties: false
required: [type, storage_domain, path]
properties:
type: {const: directory}
storage_domain: {type: string}
path: {type: string}
access_mode: {const: exclusive}
create_if_missing: {const: true}
create_options:
type: object
additionalProperties: false
required: [uid, gid, mode]
properties:
uid: {type: integer, minimum: 0}
gid: {type: integer, minimum: 0}
mode: {type: string, pattern: '^0[0-7]{3}$'}
responses:
"200":
description: Current preparation state; pending is not an available snapshot.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- type: object
properties:
data:
type: string
contentEncoding: base64
contentMediaType: application/json
contentSchema:
type: object
required: [status]
properties:
status: {type: string, enum: [pending, ready, failed]}
snapshot_id: {type: string, description: Present when ready.}
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/snapshots:
get:
tags: [Snapshots]
operationId: listSnapshots
summary: List reusable snapshots for the authenticated tenant
description: >-
Returns catalog records captured from Environments of the caller's tenant.
`environmentId` restricts the page to snapshots whose source Environment
is that ID; omitted or empty lists the whole tenant catalog. An unknown
ID, or an ID from another tenant, returns an empty page rather than an
error so the filter cannot reveal Environment existence.
parameters:
- name: name
in: query
schema:
type: string
- name: environmentId
in: query
description: >-
Source Environment ID of the snapshots to list. Omitted or empty
selects the whole tenant catalog.
schema:
type: string
maxLength: 256
- name: pageToken
in: query
schema:
type: string
- name: pageSize
in: query
schema:
type: integer
minimum: 1
responses:
"200":
description: Tenant-scoped snapshot catalog page.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- $ref: "#/components/schemas/SnapshotListEnvelopeData"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
/api/environment/v1/snapshots/{snapshotId}:
parameters:
- $ref: "#/components/parameters/SnapshotId"
get:
tags: [Snapshots]
operationId: getSnapshot
summary: Get a reusable snapshot
responses:
"200":
description: Tenant-scoped snapshot catalog record.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Envelope"
- $ref: "#/components/schemas/SnapshotEnvelopeData"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
delete:
tags: [Snapshots]
operationId: deleteSnapshot
summary: Mark a reusable snapshot for deletion
description: New references are rejected; bytes are removed after existing references are released.
parameters:
- $ref: "#/components/parameters/SnapshotDeleteOperationId"
responses:
"200":
description: Current catalog state in the standard envelope.
content:
application/json:
schema:
$ref: "#/components/schemas/Envelope"
"4XX":
$ref: "#/components/responses/Error"
default:
$ref: "#/components/responses/Error"
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Tenant or administrator API Key.
xAuth:
type: apiKey
in: header
name: X-Auth
description: Compatibility API Key header.
headers:
RequestId:
description: Logical request identity echoed by API Server.
schema:
type: string
parameters:
RequestId:
name: X-Request-Id
in: header
required: false
description: API Server generates and echoes an ID when this header is omitted.
schema:
type: string
minLength: 1
maxLength: 128
EnvironmentId:
name: environmentId
in: path
required: true
schema:
type: string
minLength: 1
SnapshotId:
name: snapshotId
in: path
required: true
schema:
type: string
minLength: 1
PauseOperationId:
name: X-ADX-Request-ID
in: header
required: true
schema:
type: string
pattern: "^pause-[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
ResumeOperationId:
name: X-ADX-Request-ID
in: header
required: true
schema:
type: string
pattern: "^resume-[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
ReloadOperationId:
name: X-ADX-Request-ID
in: header
required: true
schema:
type: string
pattern: "^reload-[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
NetworkOperationId:
name: X-ADX-Request-ID
in: header
required: true
schema:
type: string
pattern: "^network-[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
SnapshotOperationId:
name: X-ADX-Request-ID
in: header
required: true
schema:
type: string
pattern: "^snapshot-[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
SnapshotDeleteOperationId:
name: X-ADX-Request-ID
in: header
required: true
schema:
type: string
minLength: 1
maxLength: 128
responses:
Error:
description: Stable ADX error envelope; retry behavior comes from `error.retry` and `error.outcome`.
headers:
X-Request-Id:
$ref: "#/components/headers/RequestId"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorEnvelope"
schemas:
NodeResourceList:
type: object
additionalProperties: false
required: [items]
properties:
items:
type: array
items: {$ref: "#/components/schemas/NodeResource"}
NodeResource:
type: object
description: Online node scheduling resources; capacity and allocatable are zero when status is 1.
additionalProperties: false
required: [id, status, capacity, allocatable, labels]
properties:
id: {type: string, minLength: 1}
status:
type: integer
format: int32
description: Legacy UnitStatus compatibility value; 0 is normal and 1 is evicting/not accepting new allocations.
capacity: {$ref: "#/components/schemas/NodeScalarResources"}
allocatable: {$ref: "#/components/schemas/NodeScalarResources"}
labels:
type: object
additionalProperties: {type: string}
NodeScalarResources:
type: object
additionalProperties: {type: number, minimum: 0}
required: [CPU, Memory, Disk]
properties:
CPU: {type: number, minimum: 0, description: CPU millicores}
Memory: {type: number, minimum: 0, description: Memory MiB}
Disk: {type: number, minimum: 0, description: Disk MiB}
NodeSchedulingStatus:
type: object
additionalProperties: false
required: [status, message]
properties:
status: {type: string, enum: [normal, evicting]}
message: {type: string}
LegacyResourceResponse:
type: object
description: Scheduling resource totals and online node fragments; admission-disabled nodes contribute no resources to the totals.
additionalProperties: false
required: [requestID, resource]
properties:
requestID: {type: string}
resource: {$ref: "#/components/schemas/LegacyResourceUnit"}
LegacyResourceUnit:
type: object
required: [id, capacity, allocatable, status]
properties:
id: {type: string}
capacity: {$ref: "#/components/schemas/LegacyResources"}
allocatable: {$ref: "#/components/schemas/LegacyResources"}
status: {type: integer, description: 0 is normal and 1 is evicting.}
fragment:
type: object
additionalProperties: {$ref: "#/components/schemas/LegacyResourceUnit"}
nodeLabels:
type: object
additionalProperties:
type: object
required: [items]
properties:
items:
type: object
additionalProperties: {type: integer}
LegacyResources:
type: object
additionalProperties: false
required: [resources]
properties:
resources:
type: object
additionalProperties:
type: object
properties:
scalar:
type: object
required: [value]
properties:
value: {type: number, minimum: 0}
vectors:
type: object
description: Legacy-compatible whole-card count vector for GPU/NPU resources.
SchedulingQueue:
type: object
additionalProperties: false
required: [count, instanceInfos]
properties:
count: {type: integer, minimum: 0}
instanceInfos:
type: array
maxItems: 10000
items:
type: object
additionalProperties: false
required: [instanceID, requestID, resources, enqueueTimeMs, waitDurationMs, schedulingRequirements]
properties:
instanceID: {type: string}
requestID: {type: string, description: Same stable Environment ID because ADX has no second scheduling-request identity.}
resources:
type: object
additionalProperties: {oneOf: [{type: string}, {type: number}]}
enqueueTimeMs: {type: string, pattern: "^[0-9]+$"}
waitDurationMs: {type: string, pattern: "^[0-9]+$"}
schedulingRequirements:
type: object
additionalProperties: false
required: [runtimeClass]
properties:
runtimeClass:
type: string
minLength: 1
description: Resolved runtime required by this queued Environment; a node must report this value in its supported runtime classes.
CreateEnvironmentRequest:
type: object
additionalProperties: true
description: |
Unknown top-level fields are accepted and ignored for caller compatibility;
they are not forwarded to the runtime. Declared fields retain their types