-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
4226 lines (4012 loc) · 189 KB
/
Copy pathopenapi.yaml
File metadata and controls
4226 lines (4012 loc) · 189 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: cmProjectX Service API
version: 0.1.0
description: >
Contract between the Rust/WinUI 3 client and the .NET Intune engine.
This is the single source of truth for DTOs and endpoints — generate
C# and Rust types from it (see contract/README.md).
servers:
- url: http://127.0.0.1:5099
description: Local sidecar (MVP)
paths:
/health:
get:
operationId: getHealth
summary: Liveness probe
responses:
"200":
description: OK
content:
application/json:
schema: { $ref: "#/components/schemas/SyncStatus" }
/profiles:
get:
operationId: listProfiles
summary: List saved tenant profiles (Entra app registrations)
responses:
"200":
description: Saved profiles
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/TenantProfileSummary" }
post:
operationId: createProfile
summary: Create a saved tenant profile (name, tenantId, clientId required)
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/CreateProfile" }
responses:
"200":
description: Created; returns the new profile id
content:
application/json:
schema:
type: object
properties: { id: { type: string } }
required: [id]
"400": { description: "name, tenantId and clientId are required, or a profile-validation error" }
/profiles/{id}:
patch:
operationId: updateProfile
summary: Edit a saved profile; null/blank fields keep their value, empty-string secret clears it
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/CreateProfile" }
responses:
"204": { description: Updated }
"404": { description: No such profile }
delete:
operationId: deleteProfile
summary: Remove a saved profile
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
responses:
"204": { description: Deleted }
"404": { description: No such profile }
/profiles/{id}/activate:
post:
operationId: activateProfile
summary: Make a saved profile the active tenant
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
responses:
"204": { description: Activated }
"404": { description: No such profile }
/auth/signin:
post:
operationId: signIn
summary: >
Begin sign-in for the active profile (background). The flow is decided by the
profile's authMethod; poll /health for authState — a device-code prompt surfaces
in deviceCode (AwaitingDeviceCode) and interactive browser sign-in shows as
AwaitingInteractive.
responses:
"202": { description: Sign-in started; poll /health for authState + deviceCode }
"409": { description: No active profile }
/auth/signout:
post:
operationId: signOut
summary: Clear the current session
responses:
"204": { description: Signed out }
/sync:
post:
operationId: triggerSync
summary: Trigger a Graph delta sync for the active tenant
responses:
"202": { description: Accepted; sync started }
"409": { description: Not signed in }
/audit:
get:
operationId: getAuditTimeline
summary: Query the audit-event timeline (the time-machine)
parameters:
- { name: from, in: query, schema: { type: string, format: date-time } }
- { name: to, in: query, schema: { type: string, format: date-time } }
- { name: q, in: query, schema: { type: string } }
responses:
"200":
description: Matching audit events, newest first
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/AuditEvent" }
/drift:
get:
operationId: getDrift
summary: Drift between two config snapshots of an object
parameters:
- { name: objectId, in: query, required: true, schema: { type: string } }
- { name: baseSnapshotId, in: query, schema: { type: string } }
- { name: headSnapshotId, in: query, schema: { type: string } }
responses:
"200":
description: Drift record
content:
application/json:
schema: { $ref: "#/components/schemas/DriftRecord" }
/objects:
get:
operationId: listDriftObjects
summary: Objects with config-snapshot history, for the drift picker
description: >
Objects with detected drift (their two latest snapshots differ) sort to
the top, most-changed first, then by most-recently captured.
responses:
"200":
description: Objects with snapshot history
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/DriftObject" }
/preview-diff:
post:
operationId: previewDiff
summary: Field-level diff of a pending edit (before vs after), for the save confirm gate
description: >
Computes the change set a write would apply, using the same engine the
drift timeline uses. `before` is "{}" for a brand-new object. No auth.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
before: { type: string, description: Current object JSON }
after: { type: string, description: Edited object JSON }
responses:
"200":
description: The change set this edit would apply
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/DriftChange" }
/snapshots:
get:
operationId: listSnapshots
summary: An object's snapshot history (newest first), for the restore/undo picker
parameters:
- in: query
name: objectId
required: true
schema: { type: string }
responses:
"200":
description: Snapshot history with full bodies
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/SnapshotSummary" }
post:
operationId: captureSnapshot
summary: Capture the body just written (snapshot-on-write); dedups on content hash
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [objectType, objectId, bodyJson]
properties:
objectType: { type: string }
objectId: { type: string }
objectName: { type: string, nullable: true }
bodyJson: { type: string }
responses:
"200":
description: Whether a new snapshot was stored
content:
application/json:
schema:
type: object
properties:
captured: { type: boolean }
snapshotId: { type: string, nullable: true }
# ─── M15 Policy-as-Code / GitOps ──────────────────────────────────────────
# pull → plan → (gate) → apply over the existing Export / Import / Drift engines.
# The repo tree is a normalized on-disk mirror of tenant config; plan is a
# read-only Terraform-style change set; apply is the M6 safe-write rail lifted
# to tree scope (confirm + planId pin + per-object conflict check). Conditional
# Access is pull/plan only — never written (locked guarantee).
/gitops/pull:
post:
operationId: gitopsPull
summary: Export the live tenant to a normalized on-disk repo tree (+ manifest)
description: >
Lists the selected surfaces via the Core engines, writes one JSON file per
object under per-surface folders (ExportService), normalizes the tree
(ExportNormalizer) so diffs are deterministic, and writes
migration-table.json + manifest.json. 409 when signed out.
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/GitOpsPullRequest" }
responses:
"200":
description: The pull manifest (provenance + per-surface counts)
content:
application/json:
schema: { $ref: "#/components/schemas/GitOpsManifest" }
"400": { description: Missing or invalid outputPath }
"409": { description: Not signed in }
/gitops/plan:
post:
operationId: gitopsPlan
summary: Diff a repo tree against the live tenant (read-only change set)
description: >
Re-pulls the live tenant through the same normalize pipeline and diffs it
against the committed repo files with JsonDrift. Objects in the repo but not
the tenant are Added; in the tenant but not the repo are Removed; in both,
field-level Modified. The returned planId pins the live state the plan was
computed against, so apply can reject on drift. No writes. 409 when signed out.
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/GitOpsPlanRequest" }
responses:
"200":
description: The change set the repo would apply to the tenant
content:
application/json:
schema: { $ref: "#/components/schemas/GitOpsPlan" }
"400": { description: Missing repoPath or no manifest.json }
"409": { description: Not signed in }
/gitops/apply:
post:
operationId: gitopsApply
summary: Apply a reviewed plan to the tenant (gated; per-object conflict-safe)
description: >
Requires confirm:true and the planId returned by plan. Re-checks each
object's live state against the plan (hash mismatch → that object is reported
conflict and nothing is written for it). Added → create, Modified → update,
through the Core engines + ImportService, each snapshot-on-write. Removed
objects are skipped unless confirmDestroy:true. Conditional Access is never
written (locked guarantee).
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/GitOpsApplyRequest" }
responses:
"200":
description: Per-object outcomes (applied / skipped / conflict)
content:
application/json:
schema: { $ref: "#/components/schemas/GitOpsApplyResult" }
"400": { description: confirm not set, or missing repoPath/planId }
"404": { description: Unknown or expired planId }
"409": { description: Not signed in }
/gitops/status:
get:
operationId: gitopsStatus
summary: Is the tenant in sync with the repo tree? (manifest vs live summary)
parameters:
- in: query
name: repoPath
required: true
schema: { type: string }
responses:
"200":
description: Drift summary between the repo tree and the live tenant
content:
application/json:
schema: { $ref: "#/components/schemas/GitOpsStatus" }
"400": { description: Missing repoPath or no manifest.json }
"409": { description: Not signed in }
/export:
get:
operationId: exportBackup
summary: Back up the tenant to a downloadable .zip (M8; live Graph, 409 when signed out)
description: >
Exports every supported surface (one folder per type + a migration table).
Optional `types` narrows it to a comma-separated set of folder keys
(e.g. DeviceConfigurations,CompliancePolicies,SettingsCatalog).
parameters:
- in: query
name: types
required: false
schema: { type: string }
responses:
"200":
description: A backup .zip bundle
content:
application/zip:
schema: { type: string, format: binary }
"409": { description: Not signed in }
/import:
post:
operationId: importBundle
summary: Dry-run preview (default) or LIVE restore (dryRun=false) of a backup .zip (M8)
description: >
dryRun=true (default) lists what the bundle contains without writing.
dryRun=false restores every object in the bundle into the signed-in tenant
as fresh copies (ids cleared) via the Core ImportService — a live write.
parameters:
- in: query
name: dryRun
required: false
schema: { type: boolean, default: true }
requestBody:
required: true
content:
application/zip:
schema: { type: string, format: binary }
responses:
"200":
description: Dry-run preview (dryRun!=false) or restore result (dryRun=false)
content:
application/json:
schema:
oneOf:
- type: object
properties:
total: { type: integer, format: int32 }
groups:
type: array
items:
type: object
properties:
type: { type: string }
count: { type: integer, format: int32 }
names: { type: array, items: { type: string } }
- $ref: "#/components/schemas/ImportRestoreResult"
"409": { description: Not signed in }
/baselines:
get:
operationId: listBaselines
summary: Embedded OIB/CIS security baselines (M8; sync, no Graph)
responses:
"200":
description: Baseline catalog as list rows
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/ListItem" }
/baselines/compare:
post:
operationId: compareBaseline
summary: Compare a SettingsCatalog baseline (by FileName) against a tenant policy's live settings
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/BaselineCompareRequest" }
responses:
"200":
description: Settings grouped by verdict (matching / missing / drifted / extra)
content:
application/json:
schema: { $ref: "#/components/schemas/BaselineComparison" }
"400": { description: baselineId and policyId required, or tenant settings unreadable }
"404": { description: Unknown SettingsCatalog baseline }
"409": { description: Not signed in }
/policies/compare:
post:
operationId: comparePolicies
summary: Compare two live SettingsCatalog policies (A vs B), setting-by-setting
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/PolicyCompareRequest" }
responses:
"200":
description: Settings grouped by verdict (matching/same · missing/only-A · drifted/different · extra/only-B)
content:
application/json:
schema: { $ref: "#/components/schemas/BaselineComparison" }
"400": { description: aId and bId required, or policy settings unreadable }
"409": { description: Not signed in }
# ── M12.1 cache-dev (Cache Sync): inspect / warm / evict the LiteDB read-through
# blob cache for the active tenant. All ops 409 when signed out. ──
/cache:
get:
operationId: cacheStatus
summary: Per-key blob-cache status for the active tenant (M12.1; 409 when signed out)
responses:
"200":
description: One status row per cacheable LIST surface
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/CacheEntryStatus" }
"409": { description: Not signed in }
/cache/summary:
get:
operationId: cacheSummary
summary: Cache header summary — availability, last warm, live-key counts (M12.1)
responses:
"200":
description: Cache summary for the active tenant
content:
application/json:
schema: { $ref: "#/components/schemas/CacheSummary" }
"409": { description: Not signed in }
/cache/warm:
post:
operationId: cacheWarm
summary: Warm the blob cache (fire-and-forget PrefetchAllToCacheAsync; M12.1)
parameters:
- in: query
name: force
required: false
schema: { type: boolean, default: false }
responses:
"202": { description: Warm started }
"409": { description: Not signed in }
/cache/evict:
post:
operationId: cacheEvict
summary: Evict a cache key (or all keys for the tenant when omitted; M12.1)
parameters:
- in: query
name: key
required: false
schema: { type: string }
responses:
"204": { description: Evicted }
"409": { description: Not signed in }
/apps:
get:
operationId: listApps
summary: Intune applications (live Graph; 409 when signed out)
responses:
"200":
description: Applications for the active tenant
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/AppListItem" }
"409": { description: Not signed in }
# ── Devices (M2): live Graph list endpoints, all returning ListItem[] ──
/device-configs:
get:
operationId: listDeviceConfigs
summary: Device configurations (live Graph; 409 when signed out)
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createDeviceConfig
summary: Create a device configuration
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/compliance-policies:
get:
operationId: listCompliancePolicies
summary: Device compliance policies
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createCompliancePolicy
summary: Create a compliance policy
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/settings-catalog:
get:
operationId: listSettingsCatalog
summary: Settings Catalog policies
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createSettingsCatalog
summary: Create a Settings Catalog policy
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/admin-templates:
get:
operationId: listAdminTemplates
summary: Administrative templates (group policy configurations)
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createAdminTemplate
summary: Create an administrative template
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/endpoint-security:
get:
operationId: listEndpointSecurity
summary: Endpoint security intents
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createEndpointSecurity
summary: Create an endpoint security intent
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/device-categories:
get:
operationId: listDeviceCategories
summary: Device categories
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createDeviceCategory
summary: Create a device category
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/remediation-scripts:
get:
operationId: listRemediationScripts
summary: Device health (remediation) scripts
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createRemediationScript
summary: Create a remediation script
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/compliance-scripts:
get:
operationId: listComplianceScripts
summary: Device compliance scripts
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createComplianceScript
summary: Create a compliance script
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/feature-updates:
get:
operationId: listFeatureUpdates
summary: Windows feature update profiles
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createFeatureUpdate
summary: Create a feature update profile
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/quality-updates:
get:
operationId: listQualityUpdates
summary: Windows quality update profiles
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createQualityUpdate
summary: Create a quality update profile
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/driver-updates:
get:
operationId: listDriverUpdates
summary: Windows driver update profiles
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createDriverUpdate
summary: Create a driver update profile
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/platform-scripts:
get:
operationId: listPlatformScripts
summary: Device management (platform) scripts
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createPlatformScript
summary: Create a platform script
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/shell-scripts:
get:
operationId: listShellScripts
summary: macOS shell scripts
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createShellScript
summary: Create a shell script
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/mac-custom-attributes:
get:
operationId: listMacCustomAttributes
summary: macOS custom attribute shell scripts
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
post:
operationId: createMacCustomAttribute
summary: Create a macOS custom attribute shell script
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "200": { $ref: "#/components/responses/Created" }, "409": { description: Not signed in } }
/managed-devices:
get:
operationId: listManagedDevices
summary: Managed devices (list)
responses: { "200": { $ref: "#/components/responses/ListItemArray" }, "409": { description: Not signed in } }
# ── M14 device ops: detail + action verbs (Pattern F). Devices aren't authored
# (no config CRUD); they're acted on. Actions POST to Graph's managedDevice action
# verbs, gated server-side (allowlist + destructive opt-in + typed-confirm) and audited.
/managed-devices/{id}:
get:
operationId: getManagedDevice
summary: Managed device detail (inventory object JSON)
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
/managed-devices/{id}/actions:
get:
operationId: getDeviceActionHistory
summary: A device's action history (Graph deviceActionResults; live — bypasses the blob cache)
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses:
"200":
description: Action-history rows (newest state per Graph)
content:
application/json:
schema: { type: array, items: { $ref: "#/components/schemas/DeviceActionRecord" } }
"409": { description: Not signed in }
/managed-devices/actions:
get:
operationId: listDeviceActions
summary: The device-action catalog (which verbs are available + which are destructive)
responses:
"200":
description: Available device actions
content:
application/json:
schema: { type: array, items: { $ref: "#/components/schemas/DeviceActionInfo" } }
/managed-devices/{id}/actions/{action}:
post:
operationId: runDeviceAction
summary: Run an action verb against one device (gated; destructive needs typed-confirm)
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
- { name: action, in: path, required: true, schema: { type: string }, description: "managedDevice action verb, e.g. syncDevice, rebootNow, wipe, retire" }
requestBody:
required: false
content:
application/json:
schema: { $ref: "#/components/schemas/DeviceActionRequest" }
responses:
"204": { description: Action accepted by Graph }
"400": { description: Unknown action, or destructive confirm token missing/mismatched }
"403": { description: Action disabled by policy (kill-switch or destructive opt-in off) }
"404": { description: Device not found }
"409": { description: Not signed in }
/managed-devices/actions/{action}:
post:
operationId: runBulkDeviceAction
summary: Run an action verb against many devices (capped; destructive opt-in + confirm token)
parameters:
- { name: action, in: path, required: true, schema: { type: string } }
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/BulkDeviceActionRequest" }
responses:
"200":
description: Per-device outcomes
content:
application/json:
schema: { type: array, items: { $ref: "#/components/schemas/BulkDeviceActionResult" } }
"400": { description: Unknown action, selection over cap, or confirm token missing/mismatched }
"403": { description: Action disabled by policy }
"409": { description: Not signed in }
# ── Devices CRUD: detail + write for the writable device surfaces. ──
# List paths for these are defined above; here are GET /{id}, POST, PATCH, DELETE.
/device-configs/{id}:
get:
operationId: getDeviceConfig
summary: Device configuration object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateDeviceConfig
summary: Update a device configuration
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteDeviceConfig
summary: Delete a device configuration
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/compliance-policies/{id}:
get:
operationId: getCompliancePolicy
summary: Compliance policy object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateCompliancePolicy
summary: Update a compliance policy
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteCompliancePolicy
summary: Delete a compliance policy
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/settings-catalog/{id}:
get:
operationId: getSettingsCatalog
summary: Settings Catalog policy object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateSettingsCatalog
summary: Update a Settings Catalog policy (metadata)
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteSettingsCatalog
summary: Delete a Settings Catalog policy
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/settings-catalog/{id}/settings:
get:
operationId: getSettingsCatalogSettings
summary: The deep settingInstance tree for a Settings Catalog policy (fetched apart from metadata)
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses:
"200":
description: The policy's settings as a JSON array
content:
application/json:
schema: { type: array, items: { type: object } }
"409": { description: Not signed in }
/admin-templates/{id}:
get:
operationId: getAdminTemplate
summary: Administrative template object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateAdminTemplate
summary: Update an administrative template
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteAdminTemplate
summary: Delete an administrative template
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/endpoint-security/{id}:
get:
operationId: getEndpointSecurity
summary: Endpoint security intent object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateEndpointSecurity
summary: Update an endpoint security intent
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteEndpointSecurity
summary: Delete an endpoint security intent
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/remediation-scripts/{id}:
get:
operationId: getRemediationScript
summary: Remediation (device health) script object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateRemediationScript
summary: Update a remediation script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteRemediationScript
summary: Delete a remediation script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/remediation-scripts/{id}/run-summary:
get:
operationId: remediationRunSummary
summary: Proactive-remediation run counts as metric tiles
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses:
"200":
description: Run-summary tiles
content:
application/json:
schema: { type: array, items: { $ref: "#/components/schemas/ListItem" } }
"409": { description: Not signed in }
/remediation-scripts/{id}/device-states:
get:
operationId: remediationDeviceStates
summary: Per-device detection/remediation state (volatile; bypasses the cache)
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses:
"200":
description: Per-device run states
content:
application/json:
schema: { type: array, items: { $ref: "#/components/schemas/DeviceRunState" } }
"409": { description: Not signed in }
/remediation-scripts/{id}/scripts:
get:
operationId: remediationScriptContent
summary: Decoded detection + remediation script text (for the code viewer)
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses:
"200":
description: The script's decoded detection/remediation PowerShell (either may be null)
content:
application/json:
schema: { $ref: "#/components/schemas/RemediationScriptContent" }
"404": { description: Unknown remediation script }
"409": { description: Not signed in }
/remediation-scripts/{id}/run/{deviceId}:
post:
operationId: runRemediationOnDevice
summary: On-demand remediation on one device (gated — DESTRUCTIVE opt-in + confirm)
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
- { name: deviceId, in: path, required: true, schema: { type: string } }
requestBody:
required: true
content:
application/json:
schema: { type: object, properties: { confirm: { type: boolean } }, required: [confirm] }
responses:
"204": { description: On-demand remediation initiated }
"400": { description: confirm required }
"403": { description: Device actions disabled, or destructive not enabled }
"409": { description: Not signed in }
/compliance-scripts/{id}:
get:
operationId: getComplianceScript
summary: Compliance script object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateComplianceScript
summary: Update a compliance script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteComplianceScript
summary: Delete a compliance script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/platform-scripts/{id}:
get:
operationId: getPlatformScript
summary: Platform (device management) script object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updatePlatformScript
summary: Update a platform script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deletePlatformScript
summary: Delete a platform script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/shell-scripts/{id}:
get:
operationId: getShellScript
summary: macOS shell script object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateShellScript
summary: Update a shell script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteShellScript
summary: Delete a shell script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/mac-custom-attributes/{id}:
get:
operationId: getMacCustomAttribute
summary: macOS custom attribute shell script object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateMacCustomAttribute
summary: Update a macOS custom attribute shell script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteMacCustomAttribute
summary: Delete a macOS custom attribute shell script
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/device-categories/{id}:
get:
operationId: getDeviceCategory
summary: Device category object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateDeviceCategory
summary: Update a device category
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteDeviceCategory
summary: Delete a device category
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "204": { description: Deleted }, "409": { description: Not signed in } }
/feature-updates/{id}:
get:
operationId: getFeatureUpdate
summary: Windows feature update profile object JSON
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
responses: { "200": { $ref: "#/components/responses/ObjectJson" }, "404": { description: Not found }, "409": { description: Not signed in } }
patch:
operationId: updateFeatureUpdate
summary: Update a feature update profile
parameters: [ { name: id, in: path, required: true, schema: { type: string } } ]
requestBody: { $ref: "#/components/requestBodies/ObjectJson" }
responses: { "204": { description: Updated }, "409": { description: Not signed in } }
delete:
operationId: deleteFeatureUpdate