/
openapi.yaml
1118 lines (1092 loc) · 36.4 KB
/
openapi.yaml
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.0.3
info:
version: 1.0.2
title: OSUSCC API
description: API for the Sensor-Based In-Home Climate Control OSU Capstone Project.
paths:
/users:
post:
summary: Create a new User.
description: >
Create and store a new application User with specified data and adds it to the application's database. Only an authenticated User with 'admin' role can create users with the 'admin' role.
operationId: createUser
tags:
- Users
requestBody:
required: true
description: A User object.
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'201':
description: New User successfully added
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: >
Unique ID of the created User.
example: "123"
'400':
description: >
The request body was either not present or did not contain a valid User object.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
summary: Fetch a list of all Users
description: >
Returns the list of all Users. This list should be paginated. Only an authenticated User with 'admin' role can fetch all Users.
operationId: getAllUsers
tags:
- Users
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
users:
type: array
items:
$ref: '#/components/schemas/User'
/users/{id}:
parameters:
- name: id
in: path
description: >
Unique ID of a User. Exact type/format will depend on your implementation but will likely be either an integer or a string.
schema:
oneOf:
- type: integer
- type: string
example: "123"
required: true
get:
summary: Fetch data about a specific User.
description: >
Returns information about the specified User. Only an authenticated User with 'admin' role or an authenticated User whose ID matches the ID of the requested User can fetch this information.
operationId: getUserById
tags:
- Users
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified User `id` not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
summary: Update data about a specific User.
description: >
Updates information about the specified User. Only an authenticated User with 'admin' role or an authenticated User whose ID matches the ID of the requested User can update this information.
operationId: updateUserById
tags:
- Users
requestBody:
description: >
Partial updates to be applied to the specified User.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'200':
description: Success
'400':
description: >
The request body was either not present or did not contain a Home object.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Home `id` not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: Remove a specific User from the database.
description: >
Completely removes the data for the specified Home. Only an authenticated User with 'admin' role or whose ID whose ID matches the ID of the requested User can remove a User.
operationId: removeUserById
tags:
- Users
responses:
'204':
description: Success
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified User `id` not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/users/{id}/tokens:
parameters:
- name: id
in: path
description: >
Unique ID of a User. Exact type/format will depend on your implementation but will likely be either an integer or a string.
schema:
oneOf:
- type: integer
- type: string
example: "123"
required: true
post:
summary: Create an API key for a User
description: >
Create and store a new API key and adds it to the User object in the database. User API keys can only be modified by the authenticated user or a user with the 'admin' role
operationId: addApiKey
tags:
- Users
requestBody:
required: true
description: A name for the API key, and the amount of time the token is valid before expiration. Follows the format of 'expiresIn' documented here https://github.com/auth0/node-jsonwebtoken#usage
content:
application/json:
schema:
$ref: '#/components/schemas/CreateApiKeyBody'
responses:
'201':
description: New API key successfully added
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
'400':
description: >
The request body was either not present or did not contain a name and duration.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
summary: Fetch User's API keys.
description: >
Returns an array of API key objects
operationId: getUserApiKeysById
tags:
- Users
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified User `id` not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: Remove a specific User's API key from the database.
description: >
Completely removes the data for the specified API key. Only an authenticated User with 'admin' role or whose ID whose ID matches the ID of the requested User can remove a User.
operationId: removeApiKey
requestBody:
required: true
description: The API key to be deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
tags:
- Users
responses:
'204':
description: Success
'400':
description: >
The request body was either not present or did not contain a valid API key object.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified User `id` not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/users/login:
post:
summary: Log in a User.
description: >
Authenticate a specific User with their email address and password.
operationId: authenticateUser
tags:
- Users
requestBody:
required: true
description: >
Email address and plain-text password for the User being authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/User'
example:
email: jdoe@gmail.com
password: hunter2
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
token:
type: string
description: >
A JWT authentication token.
example: aaaaaaaa.bbbbbbbb.cccccccc
'400':
description: >
The request body was either not present or did not contain all of the required fields.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: >
The specified credentials were invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: >
An internal server error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/homes:
post:
summary: Create a new home.
description: >
Creates a new Home with specified data and adds it to the application's database. Only an authenticated User can create a new Home.
operationId: createHome
tags:
- Homes
requestBody:
required: true
description: A Home object.
content:
application/json:
schema:
$ref: '#/components/schemas/Home'
responses:
'201':
description: New Home successfully created
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: >
Unique ID of the created Home.
example: "123"
'400':
description: >
The request body was either not present or did not contain a valid Home object.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
summary: Fetch a list of all Homes.
description: >
Returns the list of all Homes. This list should be paginated. The Home returned should not contain the list of Sensors associated with the Home.
operationId: getAllHomes
tags:
- Homes
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Home'
/homes/{homeid}:
parameters:
- name: homeid
in: path
description: >
Unique ID of a Home.
schema:
type: string
example: "123"
required: true
get:
summary: Fetch data about a specific Home.
description: >
Returns summary data about the Home, including the list of users associated with the home and the list of Sensors for the home.
operationId: getHomeById
tags:
- Homes
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Home'
'404':
description: Specified Home `id` not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
summary: Update data for a specific Home.
description: >
Performs a partial update on the data for the Home. Only an authenticated User with 'admin' role or an authenticated 'home_admin' User whose ID is in the the `home_admin` list of the Home can update Home information.
operationId: updateHomeById
tags:
- Homes
requestBody:
description: >
Partial updates to be applied to the specified Home.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Home'
responses:
'200':
description: Success
'400':
description: >
The request body was either not present or did not contain a Home object.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Home `id` not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: Remove a specific Home from the database.
description: >
Completely removes the data for the specified Home. Only an authenticated User with 'admin' role or whose ID is in the 'home_admins' list of a Home can remove a Home.
operationId: removeHomeById
tags:
- Homes
responses:
'204':
description: Success
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Home `id` not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/homes/{homeid}/sensors:
parameters:
- name: homeid
in: path
description: >
Unique ID of a Home.
schema:
type: string
example: "123"
required: true
get:
summary: Fetch a list of the sensors attached to the Home.
description: >
Returns a list containing the Sensor IDs of all sensors connected to the home. Only an authenticated User with 'admin' role or an authenticated User whose ID is in the `users` list of the Home can fetch the list of sensors.
operationId: getSensorsByHomeId
tags:
- Homes
responses:
'200':
description: >
Array of Sensor IDs for sensors attached to the Home. Type will be string.
content:
application/json:
schema:
type: object
properties:
sensors:
type: array
items:
$ref: '#/components/schemas/User'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Sensor not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
summary: Add a new Sensor to a Home
description: >
Adds a new Sensor to a Home. Only an authenticated User with 'admin' role or an authenticated User whose ID is in the `home_admins` list of the Home can update the Sensors connected to the Home.
operationId: addSensorsByHomeId
tags:
- Homes
requestBody:
required: true
description: A Sensor object.
content:
application/json:
schema:
$ref: '#/components/schemas/Sensor'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: >
Unique ID of the created Sensor.
example: "123"
'400':
description: >
The request body was either not present or did not contain the fields described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Home `id` not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/homes/{homeid}/sensors/{sensorid}:
parameters:
- name: homeid
in: path
description: >
Unique ID of a Home.
schema:
type: string
example: "123"
required: true
- name: sensorid
in: path
description: >
Unique ID of a Sensor.
schema:
type: string
example: "123"
required: true
get:
summary: Fetch data about a specific Sensor
description: >
Returns a JSON object with data about a sensor. Only an authenticated User with 'admin' role or an authenticated User whose ID is in the `users` list of the Home can fetch the list of sensors.
operationId: getSensorById
tags:
- Homes
responses:
'200':
description: >
Information for a sensor, including readings
content:
application/json:
schema:
type: object
properties:
sensors:
type: array
items:
$ref: '#/components/schemas/Sensor'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Sensor not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
summary: Update data for a specific Sensor
description: >
Update information for a specific Sensor. Only an authenticated User with 'admin' role or an authenticated User whose ID is in the `home_admins` list of the Home can update the Sensors connected to the Home.
operationId: updateSensorById
tags:
- Homes
requestBody:
required: true
description: A Sensor object.
content:
application/json:
schema:
$ref: '#/components/schemas/Sensor'
responses:
'200':
description: Success
'400':
description: >
The request body was either not present or did not contain the fields described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Sensor not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: Remove a specific Sensor from the database.
description: >
Completely removes the data for the specified Home. Only an authenticated User with 'admin' role or whose ID is in the 'home_admins' list of a Home can remove a Home.
operationId: removeSensorById
tags:
- Homes
responses:
'204':
description: Success
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Sensor not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/homes/{homeid}/sensors/{sensorid}/readings:
parameters:
- name: homeid
in: path
description: >
Unique ID of a Home.
schema:
type: string
example: "123"
required: true
- name: sensorid
in: path
description: >
Unique ID of a Sensor.
schema:
type: string
example: "123"
required: true
get:
summary: Fetch readings for a specific Sensor
description: >
Returns a JSON object with readings from a sensor. Only an authenticated User with 'admin' role or an authenticated User whose ID is in the `users` list of the Home can fetch the list of sensors.
operationId: getSensorReadingsById
tags:
- Homes
responses:
'200':
description: >
Information for a sensor, including readings
content:
application/json:
schema:
type: array
items:
type: object
example: [{"date_time": "1674178986000", "temp_f": "52.1", "temp_c": "11.16", "humidity": "25"}]
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Sensor not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
summary: Add readings for a specific Sensor
description: >
Add readings for a specific Sensor. Only an authenticated User with 'admin' role or an authenticated User whose ID is in the `home_admins` list of the Home can update the Sensors connected to the Home.
operationId: addSensorReadingsById
tags:
- Homes
requestBody:
required: true
description: A Sensor object.
content:
application/json:
schema:
type: array
items:
type: object
example: [{"date_time": "1674178986000", "temp_f": "52.1", "temp_c": "11.16", "humidity": "25"}]
responses:
'200':
description: Success
'400':
description: >
The request body was either not present or did not contain the fields described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Specified Sensor not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/weather/now:
parameters:
- name: zipcode
in: query
description: >
Zip Code for the Home.
schema:
type: string
example: "97330"
required: true
get:
summary: Fetch the current weather.
description: >
Fetch the current weather forecast. Uses OpenWeatherMap Current Weather API: https://openweathermap.org/current and Geocoding API to convert zip code to latitude and longitude: https://openweathermap.org/api/geocoding-api
operationId: getCurrentWeather
tags:
- Weather
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
coord:
type: object
example: {lon: 10.99, lat: 44.34}
weather:
type: object
example: [{id: 501, main: "Rain", description: "moderate rain", icon: "10d"}]
base:
type: string
example: "stations"
main:
type: object
example: {temp: 77.59, feels_like: 78.06, temp_min: 75.93, temp_max: 80.42, pressure: 1015, humidity: 64, sea_level: 1015, grnd_level: 933}
visibility:
type: string
example: "10000"
wind:
type: object
example: {speed: 0.62, deg: 349, gust: 1.18}
rain:
type: object
example: {1h: 3.16}
clouds:
type: object
example: {all: 100}
dt:
type: string
example: "1661870592"
sys:
type: object
example: {type: 2, id: 1075663, country: "IT", sunrise: 1661834187, sunset: 1661882248}
timezone:
type: string
example: "7200"
id:
type: string
example: "3163858"
name:
type: string
example: "Zocca"
cod:
type: string
example: "200"
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/weather/aqi/now:
parameters:
- name: zipcode
in: query
description: >
Zip Code for the Home.
schema:
type: string
example: "97330"
required: true
get:
summary: Fetch the current air quality.
description: >
Fetch the current weather forecast. Uses OpenWeatherMap Current Weather API: https://openweathermap.org/current and Geocoding API to convert zip code to latitude and longitude: https://openweathermap.org/api/geocoding-api
operationId: getCurrentAqi
tags:
- Weather
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
DateObserved:
type: string
example: "2022-11-09 "
HourObserved:
type: string
example: 14
LocalTimeZone:
type: string
example: "PST"
ReportingAera:
type: string
example: "Corvallis"
StateCode:
type: string
example: "Oregon"
Latitude:
type: number
example: 44.5884
Longitude:
type: number
example: -123.2673
ParameterName:
type: string
example: "PM2.5"
AQI:
type: integer
example: 15
Category:
type: object
example: {Number: 1, Name: "Good"}
'403':
description: >
The request was not made by an authenticated User satisfying the authorization criteria described above.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
User:
description: >
An object representing information about an application user.
type: object
properties:
name:
type: string
description: Full name of the User.
example: Jane Doe
email:
type: string
description: >
Email address for the User. This is required to be unique among all Users.
example: doej@gmail.com
password:
type: string
description: >
The User's plain-text password. This is required when creating a new User and when logging in.
example: hunter2
admin:
type: boolean
description: >
Boolean flag determining whether or not the User has the admin role.
default: false
phone:
type: string
description: >
The User's phone number.
example: 1234567890
Home:
description: >
An object representing information about a specific home.
type: object
properties:
name:
type: string
description: The user's name for the home.
example: My House
zip_code:
type: string
description: The home's zip code.
example: "97330"
users:
type: array
description: list of users associated with the home.
items:
type: string
example: ["user1234", "user2345"]
home_admins:
type: array
description: List of users with admin permissions for the home.
items:
type: string
example: ["user1234"]
sensors:
type: array
description: List of sensors in the home.
items:
type: string
example: ["sensor123", "sensor234"]
preferences:
type: object
description: JSON Object of preferences for the home (TBD)
example: {temperature: 68}
windows:
type: array
description: List of windows in the home.
items:
type: object
example: [{name: East Window 1, direction: east, sensorid: sensor123}, {name: North Window 1, direction: North, sensorid: sensor234}]