forked from aws/aws-connected-device-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yml
2733 lines (2620 loc) · 87.5 KB
/
swagger.yml
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
---
#-----------------------------------------------------------------------------------------------------------------------
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
# with the License. A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
# and limitations under the License.
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
# with the License. A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
# and limitations under the License.
#-----------------------------------------------------------------------------------------------------------------------
openapi: 3.0.0
info:
title: 'AWS Connected Device Framework: Asset Library'
description: >
The Asset Library service is a device registry that allows you to manage
your fleet of devices within multiple hierarchical groups. Each one of the
branches of the hierarchy can represent something meaningful to your
business such as supplier, location, customer, vehicle, etc.
The hierarchies within Asset Library are represented as `Groups`. Each Group has a single parent, but can comprise of many groups and/or devices as its members.
`Devices` can be associated with one or more `Groups`, each with a named relationship to its group to give context.
`Devices` themselves can be associated with other `Devices`, representing a composition type of relationship. Examples being a mote that comprises of a number of differnet sensors, or a car engine that is comprised of a number of different components.
Different `Group Templates` can be created to align with your business, with each Group Template having its own attributes. An example Group Template could be a _Site_, with its _address_ being an example of an attribute.
Likewise, `Device Templates` can be created to represent the different types of devices within your fleet, each with their own attributes.
`Profiles` can be created and applied to device and groups to populate with default attirbutes and/or relations.
`Policies` represent a document that can be attached to one or more groups within a hierarchy, and are automatically inherited by the devices and groups.
version: 2.0.0
tags:
- name: Devices
description: >
A `Device` represents a real world physical device that needs to be
registered within the Asset Library, such as a sensor, switch, or a
robotic arm. Each device is the equivalent of a `Thing` within AWS IoT.
Devices can be attached to Groups within a hierarchy.
A Device can represent an assembly of other Devices using the `component` relationship, where the device could optionally be represented as a `Thing` within AWS IoT also.
Devices are identified by a unique `deviceId`. Devices comprise of a number of standard attributes, as well as custom attributes. Refer to the `Device Templates` section for further info.
A Device may have the following state:
- `unprovisioned`: The metadata for the device has been created, but the device has not yet been provisioned within AWS IoT
- `active`: The device is active and available for use within AWS IoT
- `decommissioned`: The device has been decommissioned, therefore is unable to connect to AWS IoT, though may be redeployed and recommissioned elsewhere
- `retired`: The device has been retired, and has been removed from AWS IoT
- name: Groups
description: >
A `Group` can represent both physical and logical groupings of devices and
other groups. Examples of physical groups include locations and
suppliers. Examples of logical groupings include bill of material
structures.
Groups can be constructured with a parent/child relationship to other groups, thus building up a hierarchy of groups. Device can then be associated to any group within the hierarchy.
Groups are identified by a unique `path`. Groups comprise of a number of standard attributes, as well as custom attributes. Refer to the `Group Templates` section for further info.
- name: Templates
description: >
Templates represent custom device and group templates that you define,
each with their own attributes and constraints.
Devices are identified by a unique `deviceId`, each have the following built-in attributes:
- `templateId`: a specific device template that represents what custom attributes the device can have
- `name`: name of the device
- `description`: description of the device
- `imageUrl`: URL of an image of the device
- `awsIotThingArn`: the ARN to lookup devices that have been registered as Things within AWS IoT
- `connected`: indicates whether the device is currently connected to AWS IoT
- `state`: the state of the device (unprovisioned, active, decommissioned or retired)
- `groups`: the paths of the groups that the device has been attached to
- `attributes`: A key value map of attributes that have been created as part of defining a custom device template.
When a Device is created as a component of another Device, it has all the same built-in attributes as described above with the exception of `groups`.
Groups are identified by a unique `path`, and each have the following built-on attributes:
- `templateId`: a specific group template that represents what custom attributes the group can have
- `parentPath`: the path of the parent group that the group belongs to
- `name`: name of the group
- `description`: description of the group
- `attributes`: A key value map of attributes that have been created as part of defining a custom group template.
When defining the attributes of a custom device/group template, constraints can be applied using JSON Schema notation. Each of these custom attributes is accessible as `attributes.` within the custom device/group template.
A simple example request body to register a new device template:
{
"properties": {
"length": {"type": "number"},
"width": {"type": "number"},
"height": {"type": "number"}
}
}
A more complex example request body to register a new device template:
{
"properties": {
"length": {
"type": "number",
"minimum": 1,
"maximum": 5
},
"width": {
"type": "integer",
"multipleOf": 2
},
"fleet": {
"type": "string",
"minLength": 5,
"maxLength": 50
},
"firmware": {
"type": "string",
"pattern": "[abc]+"
},
"ipAddress": {
"type": "string",
"format": "ipv4"
},
"level": {
"type": "string",
"enum": ["low", "medium", "high"]
}
},
"required": ["fleet", "firmware", "ipAddress"]
}
- name: Profiles
description: >
A profile represents a set of default attributes and/or relations that can
be applied to a device/group for a particular template. Multiple profiles
can be created per template.
- name: Policies
description: >
A policy represents a document that can be attached to one or more
hierarchies, and then be inherited by any groups or devices that belong to
all the hierarchies that the policy is applied to.
A good use for policies is to look up appropriate documents or authorization levels based on a device or groups associations to specific hierarchies. As an example, let's say you need to apply different AWS IoT security policies when registering devices as Things depending upon their location. This would be handled by assigning a policy representing a provisoning template to different groups within a hierarchy representing the location. The appropriate provisioning template will be returned for the device/group depending on which and where in a hierarchy they are attached to.
- name: Search
description: >
The search api allows you to search across both devices and groups
applying a variety of different filters.
Filters are applied via query parameters. To apply filters uisng an attribute from the item being returned specify in the format of `?filter=field:value`. To filter based on an attribute of a linked item, specify in the format of `?filter=relation:direction:field:value`. Multiple `relation:direction`'s may be specified to define paths between multiple linked items using the format `?filter=relation_1:direction_1:relation...:direction...:field:value`.
URL Parameter | Description
---|---
`?eq=deviceId:MOD123` | 'deviceId' equals 'MOD123'
`?lte=cycles:5` | 'cycles' less than or equals to 5
`?gt=located_at:out:qty:10` | 'qty' of the item linked via the outgoing 'located_at' relation is greater than 10
Multiple queries of the same type may be specified, for example if two equal filters are required:
?eq=deviceId:MOD123&eq=state:active
paths:
'/templates/device':
get:
tags:
- Templates
summary: List device templates
description: Lists all device templates for a given status.
operationId: listDeviceTemplates
parameters:
- $ref: '#/components/parameters/templateStatusQuery'
- $ref: '#/components/parameters/offsetQuery'
- $ref: '#/components/parameters/countQuery'
- $ref: '#/components/parameters/sortQuery'
responses:
'200':
description: OK
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/TemplateInfoList'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/TemplateInfoList'
'400':
$ref: '#/components/responses/BadRequest'
'/templates/device/{templateId}':
parameters:
- $ref: '#/components/parameters/templateIdPath'
post:
tags:
- Templates
summary: >
Registers a new device template within the system, using the JSON Schema
standard to define the device template attributes and constraints.
operationId: createDeviceTemplate
requestBody:
$ref: '#/components/requestBodies/TemplateDefinition'
responses:
'201':
$ref: '#/components/responses/Created'
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/ConcurrentModificationException'
get:
tags:
- Templates
summary: Find device template by ID
description: Returns a single device template definition
operationId: getDeviceTemplate
parameters:
- $ref: '#/components/parameters/templateStatusQuery'
responses:
'200':
description: OK
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/TemplateInfo'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/TemplateInfo'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
patch:
tags:
- Templates
summary: Update an existing device template.
operationId: updateDeviceTemplate
requestBody:
$ref: '#/components/requestBodies/TemplateDefinition'
responses:
'204':
description: OK
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ConcurrentModificationException'
delete:
tags:
- Templates
summary: Deletes an existing device template.
operationId: deleteDeviceTemplate
responses:
'204':
description: OK
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/templates/device/{templateId}/publish':
parameters:
- $ref: '#/components/parameters/templateIdPath'
put:
tags:
- Templates
summary: Publishes an existing device template.
operationId: publishDeviceTemplate
responses:
'204':
description: OK
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/templates/group':
get:
tags:
- Templates
summary: List group templates
description: Lists all group templates for a given status.
operationId: listGroupTemplates
parameters:
- $ref: '#/components/parameters/templateStatusQuery'
- $ref: '#/components/parameters/offsetQuery'
- $ref: '#/components/parameters/countQuery'
- $ref: '#/components/parameters/sortQuery'
responses:
'200':
description: OK
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/TemplateInfoList'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/TemplateInfoList'
'400':
$ref: '#/components/responses/BadRequest'
'/templates/group/{templateId}':
parameters:
- $ref: '#/components/parameters/templateIdPath'
post:
tags:
- Templates
summary: >
Registers a new group template within the system, using the JSON Schema
standard to define the group template attributes and constraints.
operationId: createGroupTemplate
requestBody:
$ref: '#/components/requestBodies/TemplateDefinition'
responses:
'201':
$ref: '#/components/responses/Created'
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/ConcurrentModificationException'
get:
tags:
- Templates
summary: Find group template by ID
description: Returns a single group template definition
operationId: getGroupTemplate
parameters:
- name: status
in: query
description: Status of group template to return
required: true
schema:
type: string
enum:
- draft
- published
responses:
'200':
description: OK
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/TemplateInfo'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/TemplateInfo'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
patch:
tags:
- Templates
summary: Update an existing group template.
operationId: updateGroupTemplate
requestBody:
$ref: '#/components/requestBodies/TemplateDefinition'
responses:
'204':
description: OK
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ConcurrentModificationException'
delete:
tags:
- Templates
summary: Deletes an existing group template.
operationId: deleteGroupTemplate
responses:
'204':
description: OK
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/templates/group/{templateId}/publish':
parameters:
- $ref: '#/components/parameters/templateIdPath'
put:
tags:
- Templates
summary: Publishes an existing group template.
operationId: publishGroupTemplate
responses:
'204':
description: OK
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
/devices:
post:
tags:
- Devices
summary: Add a new device to the asset library, adding it to the `/unprovisioned`
group if no group is specified.
operationId: createDevice
parameters:
- $ref: '#/components/parameters/applyProfileQuery'
requestBody:
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/Device_1_0'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/Device_2_0'
description: Device to add to the asset library
required: true
responses:
'201':
$ref: '#/components/responses/Created'
'400':
$ref: '#/components/responses/BadRequest'
/bulkdevices:
post:
tags:
- Devices
summary: Adds a batch of devices in bulk to the asset library, adding them to the
`/unprovisioned` group if no groups are specified.
operationId: createDeviceBatch
parameters:
- $ref: '#/components/parameters/applyProfileQuery'
requestBody:
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/BulkDevices'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/BulkDevices'
description: List of devices to add to the asset library
required: true
responses:
'201':
$ref: '#/components/responses/Created'
'400':
$ref: '#/components/responses/BadRequest'
patch:
tags:
- Devices
summary: Update a batch of existing devices
operationId: updateDeviceBatch
parameters:
- $ref: '#/components/parameters/applyProfileQuery'
requestBody:
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/BulkDevices'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/BulkDevices'
description: List of devices and their attributes to update
required: true
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
get:
tags:
- Devices
summary: Find devices by ID
description: Returns a batch of devices.
operationId: bulkGetDevices
parameters:
- $ref: '#/components/parameters/deviceIdsQuery'
- $ref: '#/components/parameters/expandComponentsQuery'
- $ref: '#/components/parameters/attributesQuery'
- $ref: '#/components/parameters/includeGroupsQuery'
responses:
'200':
description: successful operation
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/DeviceList'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/DeviceList'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/devices/{deviceId}':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
get:
tags:
- Devices
summary: Find device by ID
description: Returns a single device
operationId: getDeviceByID
parameters:
- $ref: '#/components/parameters/expandComponentsQuery'
- $ref: '#/components/parameters/attributesQuery'
- $ref: '#/components/parameters/includeGroupsQuery'
- $ref: '#/components/parameters/expandRelatedDevicesQuery'
- $ref: '#/components/parameters/expandRelatedGroupsQuery'
- $ref: '#/components/parameters/filterRelationsQuery'
responses:
'200':
description: successful operation
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/Device_1_0'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/Device_2_0'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Devices
summary: Delete device of specified ID
description: Deletes a single device
operationId: deleteDevice
responses:
'204':
description: successful operation
'404':
$ref: '#/components/responses/NotFound'
patch:
tags:
- Devices
summary: Update an existing device attributes
operationId: updateDevice
parameters:
- name: applyProfile
in: query
description: Optionally apply a profile to the device to update unset attributes
with attributes from the profile.
schema:
type: string
requestBody:
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/Device_1_0'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/Device_2_0'
description: Device object that needs to be updated in device store
required: true
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/devices/{deviceId}/{relationship}/groups':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
- $ref: '#/components/parameters/relationshipPath'
get:
tags:
- Groups
summary: List a devices related groups.
operationId: listDeviceRelatedGroups
parameters:
- $ref: '#/components/parameters/templateQuery'
- $ref: '#/components/parameters/directionQuery'
- $ref: '#/components/parameters/offsetQuery'
- $ref: '#/components/parameters/countQuery'
- $ref: '#/components/parameters/sortQuery'
responses:
'200':
description: successful operation
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/GroupList'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/GroupList'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Groups
summary: Remove a device's associated groups
operationId: detachFromGroups
responses:
'204':
description: successful operation
'404':
$ref: '#/components/responses/NotFound'
'/devices/{deviceId}/{relationship}/groups/{groupPath}':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
- $ref: '#/components/parameters/relationshipPath'
- $ref: '#/components/parameters/groupPathPath'
put:
tags:
- Devices
summary: Associates a device to a group, giving context to its relationship.
operationId: attachToGroup
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Devices
summary: Removes a device from an associated group
operationId: detachFromGroup
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/devices/{deviceId}/{relationship}/{direction}/groups/{groupPath}':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
- $ref: '#/components/parameters/relationshipPath'
- $ref: '#/components/parameters/directionPath'
- $ref: '#/components/parameters/groupPathPath'
put:
tags:
- Devices
summary: Associates a device to a group, giving context to its relationship.
operationId: attachToGroupWithDirection
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Devices
summary: Removes a device from an associated group
operationId: detachFromGroupWithDirection
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/devices/{deviceId}/{relationship}/devices':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
- $ref: '#/components/parameters/relationshipPath'
get:
tags:
- Devices
summary: List a devices related devices.
operationId: listDeviceRelatedDevices
parameters:
- $ref: '#/components/parameters/templateQuery'
- $ref: '#/components/parameters/directionQuery'
- $ref: '#/components/parameters/stateQuery'
- $ref: '#/components/parameters/offsetQuery'
- $ref: '#/components/parameters/countQuery'
- $ref: '#/components/parameters/sortQuery'
responses:
'200':
description: successful operation
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/DeviceList'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/DeviceList'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Devices
summary: Remove a device's associated devices
operationId: detachFromDevices
responses:
'204':
description: successful operation
'404':
$ref: '#/components/responses/NotFound'
'/devices/{deviceId}/{relationship}/devices/{otherDeviceId}':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
- $ref: '#/components/parameters/relationshipPath'
- name: otherDeviceId
in: path
description: ID of device to create relationship to.
required: true
schema:
type: string
put:
tags:
- Devices
summary: Associates a device to another device, giving context to its
relationship.
operationId: attachToDevice
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Devices
summary: Removes a device from an associated device
operationId: detachFromDevice
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/devices/{deviceId}/{relationship}/{direction}/devices/{otherDeviceId}':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
- $ref: '#/components/parameters/relationshipPath'
- $ref: '#/components/parameters/directionPath'
- name: otherDeviceId
in: path
description: ID of device to create relationship to.
required: true
schema:
type: string
put:
tags:
- Devices
summary: Associates a device to another device, giving context to its
relationship.
operationId: attachToDeviceWithDirection
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Devices
summary: Removes a device from an associated device
operationId: detachFromDeviceWithDirection
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/devices/{deviceId}/components':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
post:
tags:
- Devices
summary: Createa a new component and adds to the device.
operationId: createComponent
requestBody:
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/Device_1_0'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/Device_2_0'
description: Device to add as a component
required: true
responses:
'201':
$ref: '#/components/responses/Created'
'400':
$ref: '#/components/responses/BadRequest'
'/devices/{deviceId}/components/{componentId}':
parameters:
- $ref: '#/components/parameters/deviceIdPath'
- $ref: '#/components/parameters/componentIdPath'
patch:
tags:
- Devices
summary: Updates the component of a device.
operationId: updateComponent
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Devices
summary: Deletes a component of a devoce.
operationId: deleteComponent
responses:
'204':
description: successful operation
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
/groups:
post:
tags:
- Groups
summary: Adds a new group to the device library as a child of the `parentPath` as
specified in the request body.
operationId: createGroup
parameters:
- $ref: '#/components/parameters/applyProfileQuery'
requestBody:
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/Group_1_0'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/Group_2_0'
description: Group to add to the asset library
required: true
responses:
'201':
$ref: '#/components/responses/Created'
'400':
$ref: '#/components/responses/BadRequest'
/bulkgroups:
post:
tags:
- Groups
summary: Adds a batch of new group to the asset library as a child of the
`parentPath` as specified in the request body.
operationId: createGroupBatch
parameters:
- $ref: '#/components/parameters/applyProfileQuery'
requestBody:
content:
application/vnd.aws-cdf-v1.0+json:
schema:
type: array
items:
$ref: '#/components/schemas/BulkGroups'
application/vnd.aws-cdf-v2.0+json:
schema:
type: array
items:
$ref: '#/components/schemas/BulkGroups'
description: Group to add to the asset library
required: true
responses:
'201':
$ref: '#/components/responses/Created'
'400':
$ref: '#/components/responses/BadRequest'
get:
tags:
- Groups
summary: Find Groups by Group Path
description: Returns a batch of groups.
operationId: bulkGetGroups
parameters:
- $ref: '#/components/parameters/groupPathsQuery'
- $ref: '#/components/parameters/includeGroupsBooleanQuery'
responses:
'200':
description: successful operation
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/GroupList'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/GroupList'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'/groups/{groupPath}':
parameters:
- $ref: '#/components/parameters/groupPathPath'
- $ref: '#/components/parameters/includeGroupsBooleanQuery'
get:
tags:
- Groups
summary: Find group by Group's path
description: Returns a single group
operationId: getGroup
responses:
'200':
description: successful operation
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/Group_1_0'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/Group_2_0'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Groups
summary: Delete group with supplied path
description: Deletes a single group
operationId: deleteGroup
responses:
'204':
description: successful operation
'404':
$ref: '#/components/responses/NotFound'
patch:
tags:
- Groups
summary: Update an existing group attributes, including changing its parent group.
operationId: updateGroup
parameters:
- $ref: '#/components/parameters/applyProfileQuery'
requestBody:
content:
application/vnd.aws-cdf-v1.0+json:
schema:
$ref: '#/components/schemas/Group_1_0'
application/vnd.aws-cdf-v2.0+json:
schema:
$ref: '#/components/schemas/Group_2_0'
description: Group object that needs to be updated
required: true
responses:
'204':