Repository navigation
Expand file tree
/
Copy pathdeclaration_reporting_service.json
More file actions
773 lines (773 loc) · 24.6 KB
/
Copy pathdeclaration_reporting_service.json
File metadata and controls
773 lines (773 loc) · 24.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
{
"components": {
"parameters": {
"X-Environment-Id": {
"description": "The environment UUID identifier.",
"in": "header",
"name": "X-Environment-Id",
"required": true,
"schema": {
"example": "e77c1408-10c8-4007-b177-abc9157fbcaa",
"format": "uuid",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"type": "string"
}
}
},
"schemas": {
"ApiErrorDto": {
"properties": {
"errors": {
"items": {
"$ref": "#/components/schemas/ErrorDto"
},
"type": "array"
},
"httpStatus": {
"description": "HTTP status of the response",
"example": 400,
"format": "int32",
"maximum": 599,
"minimum": 100,
"type": "integer"
},
"traceId": {
"description": "Trace ID",
"example": "3e3819a63ae0f231",
"type": "string"
}
},
"required": [
"errors"
],
"type": "object"
},
"DeviceChannelsDto": {
"properties": {
"channels": {
"description": "The channels associated with the device",
"items": {
"type": "string"
},
"type": "array"
},
"deviceId": {
"description": "The platform deviceId",
"example": "179a77b6-aafb-45be-83de-915f531e4e39",
"type": "string"
}
},
"type": "object"
},
"ErrorDto": {
"properties": {
"code": {
"description": "Error-specific code that can be used to identify localization string, etc.",
"example": "INVALID_FIELD",
"type": "string"
},
"description": {
"description": "A general description of error for troubleshooting/debugging. Generally this text should not be displayed to a user; instead refer to errorCode and its localized text.",
"example": "Field name is required.",
"type": "string"
},
"field": {
"description": "Name of the field that caused the error.",
"example": "name",
"type": "string"
},
"id": {
"description": "id of object with error",
"example": "2b7b22dc-a0d4-48d2-a02d-8fdd88e1397c",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"FilteredDeclarationReportDto": {
"properties": {
"declarationIdentifier": {
"description": "The declaration identifier",
"example": "179a77b6-aafb-45be-83de-915f531e4e39",
"type": "string"
},
"results": {
"description": "The devices associated with the declaration that meet the required filters",
"items": {
"$ref": "#/components/schemas/FilteredResultDto"
},
"type": "array"
},
"totalCount": {
"description": "The total number of devices reported for the declaration that meet the required filters",
"format": "int64",
"type": "integer"
}
},
"required": [
"declarationIdentifier",
"results",
"totalCount"
],
"type": "object"
},
"FilteredDeviceReportDto": {
"properties": {
"deviceId": {
"description": "The platform deviceId",
"example": "179a77b6-aafb-45be-83de-915f531e4e39",
"type": "string"
},
"results": {
"description": "The declarations associated with any channel on the device that meet the required filters",
"items": {
"$ref": "#/components/schemas/FilteredResultDto"
},
"type": "array"
},
"totalCount": {
"description": "The total number of declarations reported for the device that meet the required filters",
"format": "int64",
"type": "integer"
}
},
"required": [
"deviceId",
"results",
"totalCount"
],
"type": "object"
},
"FilteredResultDto": {
"externalDocs": {
"description": "Apple Documentation: Status Management Declarations",
"url": "https://developer.apple.com/documentation/devicemanagement/statusmanagementdeclarationsdeclarationobject"
},
"properties": {
"active": {
"description": "The active state of the declaration",
"example": true,
"type": "boolean"
},
"channel": {
"description": "The channel of the client from which the report is sent",
"example": "SYSTEM",
"type": "string"
},
"dateUpdated": {
"description": "The timestamp when this declaration status was last updated for the device",
"format": "date-time",
"type": [
"string",
"null"
]
},
"declarationIdentifier": {
"description": "The identifier of the declaration",
"example": "ea6ddcb3-729f-42b1-a67d-940008419baa",
"type": "string"
},
"deviceId": {
"description": "The platform deviceId",
"example": "179a77b6-aafb-45be-83de-915f531e4e39",
"type": "string"
},
"lastReportTime": {
"description": "The timestamp of the device's last status report",
"format": "date-time",
"type": [
"string",
"null"
]
},
"reasons": {
"description": "Reasons associated with the declaration, if any",
"items": {
"$ref": "#/components/schemas/StatusReportDeclarationReasonDto"
},
"type": "array"
},
"serverToken": {
"description": "The server token for the declaration",
"example": "2c9e3ec8907bf6e58fd93f2e28a02883ac58dde58906671003074deb84de6ff8",
"type": "string"
},
"status": {
"description": "The installation status of the declaration",
"enum": [
"PENDING",
"SUCCESSFUL",
"AWAITING_SYNC",
"UNSUCCESSFUL",
"UNKNOWN"
],
"example": "PENDING",
"type": "string"
},
"type": {
"description": "The type of the declaration",
"enum": [
"ASSET",
"MANAGEMENT",
"CONFIGURATION",
"ACTIVATION",
"UNKNOWN"
],
"example": "CONFIGURATION",
"type": "string"
},
"validityState": {
"description": "The validity state of the declaration",
"enum": [
"VALID",
"INVALID",
"UNKNOWN"
],
"example": "VALID",
"type": "string"
}
},
"required": [
"active",
"channel",
"declarationIdentifier",
"deviceId",
"serverToken",
"status",
"type",
"validityState"
],
"type": "object"
},
"StatusReportDeclarationReasonDetailDto": {
"properties": {
"description": {
"description": "The description of the detail key",
"example": "f5d98fac-5f8a-4bde-b1f8-308a062dd591",
"type": "string"
},
"key": {
"description": "The reason detail key",
"example": "Identifier",
"type": "string"
}
},
"required": [
"description",
"key"
],
"type": "object"
},
"StatusReportDeclarationReasonDto": {
"properties": {
"code": {
"description": "The reason code",
"example": "Error.ConfigurationAlreadyPresent",
"type": "string"
},
"description": {
"description": "The description of the reason",
"example": "Configuration cannot be applied as another is already present",
"type": "string"
},
"details": {
"description": "Details associated with the reason, if any",
"items": {
"$ref": "#/components/schemas/StatusReportDeclarationReasonDetailDto"
},
"type": "array"
}
},
"required": [
"code",
"description"
],
"type": "object"
}
},
"securitySchemes": {
"oauth2": {
"description": "Obtain an access token by calling the API Gateway's token endpoint using the OAuth2 client-credentials flow.",
"flows": {
"clientCredentials": {
"scopes": {
"declarations:read": ""
},
"tokenUrl": "https://{region}.api.jamfcloud.com/auth/token"
}
},
"type": "oauth2"
}
}
},
"info": {
"contact": {
"name": "Jamf Developer",
"url": "https://developer.jamf.com"
},
"description": "API for accessing device and declaration status reports",
"termsOfService": "https://www.jamf.com/developer-resources/api-license-agreement/",
"title": "Declaration Reporting Service",
"version": "1.0.0"
},
"openapi": "3.1.0",
"paths": {
"/v1/declarations/{declarationIdentifier}/devices": {
"get": {
"description": "Get a declaration report containing the filtered devices currently reporting the provided declarationIdentifier. Supports pagination, sorting, and filtering with RSQL syntax. **Filtering:** Filters only apply to declarations already on the device (excludes PENDING status). Supported filter fields: `deviceId`, `channel`, `lastReportTime`, `active`, `validityState`, `declarationType`, `dateUpdated`. **Sorting:** Use `?sort=field,direction` (e.g., `?sort=declarationType,asc`). For more information on RSQL, see [Jamf Developer Portal](https://developer.jamf.com)\n\n**Required Permissions:** `declarations:read`",
"operationId": "getDeclarationReportByFilter",
"parameters": [
{
"$ref": "#/components/parameters/X-Environment-Id"
},
{
"description": "The declarationIdentifier present on a status report",
"example": "179a77b6-aafb-45be-83de-915f531e4e39",
"in": "path",
"name": "declarationIdentifier",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "RSQL filter expression. Allowed fields: deviceId, channel, lastReportTime, active, validityState, declarationType, dateUpdated",
"example": "channel==SYSTEM;active==true",
"in": "query",
"name": "filter",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Zero-based page index (0..N)",
"in": "query",
"name": "page",
"schema": {
"default": 0,
"minimum": 0,
"type": "integer"
}
},
{
"description": "The size of the page to be returned",
"in": "query",
"name": "size",
"schema": {
"default": 20,
"minimum": 1,
"type": "integer"
}
},
{
"description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
"in": "query",
"name": "sort",
"schema": {
"items": {
"type": "string"
},
"type": "array"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FilteredDeclarationReportDto"
}
}
},
"description": "Successfully retrieved the filtered declaration report"
},
"400": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": "INVALID_FILTER",
"description": "Unsupported filter field: 'unknownField'. Supported fields are: deviceId, channel, lastReportTime, active, validityState, declarationType, dateUpdated",
"field": null,
"id": null
}
],
"httpStatus": 400,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Bad request - invalid RSQL filter or unsupported field"
},
"500": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": null,
"description": "An unexpected error occurred",
"field": null,
"id": null
}
],
"httpStatus": 500,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Unknown error occurred"
},
"503": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": "BULKHEAD_LIMIT_REACHED",
"description": "Bulkhead limit reached",
"field": null,
"id": null
}
],
"httpStatus": 503,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Too many requests - bulkhead limit reached"
}
},
"security": [
{
"oauth2": [
"declarations:read"
]
}
],
"summary": "Get filtered declaration report devices",
"tags": [
"declaration-reports"
],
"x-required-privileges": [
"declarations:read"
]
}
},
"/v1/devices/{deviceId}/channels": {
"get": {
"description": "Get a list of all channels available for the provided deviceId.\n\n**Required Permissions:** `declarations:read`",
"operationId": "getDeviceChannels",
"parameters": [
{
"$ref": "#/components/parameters/X-Environment-Id"
},
{
"description": "The platform deviceId",
"example": "179a77b6-aafb-45be-83de-915f531e4e39",
"in": "path",
"name": "deviceId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceChannelsDto"
}
}
},
"description": "Successfully retrieved the device channels"
},
"400": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": null,
"description": "Failed to process status report",
"field": null,
"id": null
}
],
"httpStatus": 400,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Bad request"
},
"500": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": null,
"description": "An unexpected error occurred",
"field": null,
"id": null
}
],
"httpStatus": 500,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Unknown error occurred"
},
"503": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": "BULKHEAD_LIMIT_REACHED",
"description": "Bulkhead limit reached",
"field": null,
"id": null
}
],
"httpStatus": 503,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Too many requests - bulkhead limit reached"
}
},
"security": [
{
"oauth2": [
"declarations:read"
]
}
],
"summary": "Get device channels",
"tags": [
"device-reports"
],
"x-required-privileges": [
"declarations:read"
]
}
},
"/v1/devices/{deviceId}/declarations": {
"get": {
"description": "Get a device report containing the filtered declarations reported for the provided deviceId. Supports pagination, sorting, and filtering with RSQL syntax. **Filtering:** Filters only apply to declarations already on the device (excludes PENDING status). Supported filter fields: `declarationIdentifier`, `active`, `declarationType`, `validityState`, `dateUpdated`, `channel`. **Note:** Wildcard matching on declarationIdentifier (e.g. `declarationIdentifier==Blueprint_*`) is case-insensitive. **Sorting:** Use `?sort=field,direction` (e.g., `?sort=declarationType,asc\u0026sort=declarationIdentifier,desc`). Supported sort fields: declarationIdentifier, declarationType, active, validityState, dateUpdated. Results are returned in database order if no sort parameter is provided. For more information on RSQL, see [Jamf Developer Portal](https://developer.jamf.com)\n\n**Required Permissions:** `declarations:read`",
"operationId": "getDeviceReportByFilter",
"parameters": [
{
"$ref": "#/components/parameters/X-Environment-Id"
},
{
"description": "The platform deviceId",
"example": "179a77b6-aafb-45be-83de-915f531e4e39",
"in": "path",
"name": "deviceId",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "RSQL filter expression. Allowed fields: declarationIdentifier, active, validityState, declarationType, dateUpdated, channel",
"example": "declarationIdentifier==Blueprint_66446f3a-03c8-44d6-ba31-46cf156bb448*;declarationType==CONFIGURATION",
"in": "query",
"name": "filter",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Zero-based page index (0..N)",
"in": "query",
"name": "page",
"schema": {
"default": 0,
"minimum": 0,
"type": "integer"
}
},
{
"description": "The size of the page to be returned",
"in": "query",
"name": "size",
"schema": {
"default": 20,
"minimum": 1,
"type": "integer"
}
},
{
"description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
"in": "query",
"name": "sort",
"schema": {
"items": {
"type": "string"
},
"type": "array"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FilteredDeviceReportDto"
}
}
},
"description": "Successfully retrieved the filtered device report"
},
"400": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": "INVALID_FILTER",
"description": "Unsupported filter field: 'unknownField'. Supported fields are: declarationIdentifier, active, declarationType, validityState, dateUpdated, channel",
"field": null,
"id": null
}
],
"httpStatus": 400,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Bad request - invalid RSQL filter or unsupported field"
},
"500": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": null,
"description": "An unexpected error occurred",
"field": null,
"id": null
}
],
"httpStatus": 500,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Unknown error occurred"
},
"503": {
"content": {
"application/json": {
"example": {
"errors": [
{
"code": "BULKHEAD_LIMIT_REACHED",
"description": "Bulkhead limit reached",
"field": null,
"id": null
}
],
"httpStatus": 503,
"traceId": "3e3819a63ae0f231"
},
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
},
"description": "Too many requests - bulkhead limit reached"
}
},
"security": [
{
"oauth2": [
"declarations:read"
]
}
],
"summary": "Get filtered device report declarations",
"tags": [
"device-reports"
],
"x-required-privileges": [
"declarations:read"
]
}
}
},
"security": [
{
"oauth2": []
}
],
"servers": [
{
"description": "Jamf Beta API Gateway - prod",
"url": "https://{region}.api.jamfcloud.com/ddm/report",
"variables": {
"region": {
"default": "us",
"description": "Geographic deployment region",
"enum": [
"us",
"eu",
"apac"
]
}
}
}
],
"tags": [
{
"name": "device report"
},
{
"name": "declaration report"
}
],
"x-scope-types": [
"environment"
]
}