aboutsummaryrefslogtreecommitdiff
path: root/googleapiclient/discovery_cache/documents/homegraph.v1.json
blob: 59444e02b03697f487de350d466504a6a6d8f1d3 (plain)
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
{
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/homegraph": {
          "description": "Private Service: https://www.googleapis.com/auth/homegraph"
        }
      }
    }
  },
  "basePath": "",
  "baseUrl": "https://homegraph.googleapis.com/",
  "batchPath": "batch",
  "canonicalName": "Home Graph Service",
  "description": "",
  "discoveryVersion": "v1",
  "documentationLink": "https://developers.google.com/actions/smarthome/create-app#request-sync",
  "fullyEncodeReservedExpansion": true,
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "id": "homegraph:v1",
  "kind": "discovery#restDescription",
  "mtlsRootUrl": "https://homegraph.mtls.googleapis.com/",
  "name": "homegraph",
  "ownerDomain": "google.com",
  "ownerName": "Google",
  "parameters": {
    "$.xgafv": {
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ],
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query",
      "type": "string"
    },
    "access_token": {
      "description": "OAuth access token.",
      "location": "query",
      "type": "string"
    },
    "alt": {
      "default": "json",
      "description": "Data format for response.",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query",
      "type": "string"
    },
    "callback": {
      "description": "JSONP",
      "location": "query",
      "type": "string"
    },
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query",
      "type": "string"
    },
    "key": {
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query",
      "type": "string"
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "location": "query",
      "type": "string"
    },
    "prettyPrint": {
      "default": "true",
      "description": "Returns response with indentations and line breaks.",
      "location": "query",
      "type": "boolean"
    },
    "quotaUser": {
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query",
      "type": "string"
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query",
      "type": "string"
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query",
      "type": "string"
    }
  },
  "protocol": "rest",
  "resources": {
    "agentUsers": {
      "methods": {
        "delete": {
          "description": "Unlinks the given third-party user from your smart home Action. All data related to this user will be deleted. For more details on how users link their accounts, see [fulfillment and authentication](https://developers.google.com/assistant/smarthome/concepts/fulfillment-authentication). The third-party user's identity is passed in via the `agent_user_id` (see DeleteAgentUserRequest). This request must be authorized using service account credentials from your Actions console project.",
          "flatPath": "v1/agentUsers/{agentUsersId}",
          "httpMethod": "DELETE",
          "id": "homegraph.agentUsers.delete",
          "parameterOrder": [
            "agentUserId"
          ],
          "parameters": {
            "agentUserId": {
              "description": "Required. Third-party user ID.",
              "location": "path",
              "pattern": "^agentUsers/.*$",
              "required": true,
              "type": "string"
            },
            "requestId": {
              "description": "Request ID used for debugging.",
              "location": "query",
              "type": "string"
            }
          },
          "path": "v1/{+agentUserId}",
          "response": {
            "$ref": "Empty"
          },
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ]
        }
      }
    },
    "devices": {
      "methods": {
        "query": {
          "description": "Gets the current states in Home Graph for the given set of the third-party user's devices. The third-party user's identity is passed in via the `agent_user_id` (see QueryRequest). This request must be authorized using service account credentials from your Actions console project.",
          "flatPath": "v1/devices:query",
          "httpMethod": "POST",
          "id": "homegraph.devices.query",
          "parameterOrder": [],
          "parameters": {},
          "path": "v1/devices:query",
          "request": {
            "$ref": "QueryRequest"
          },
          "response": {
            "$ref": "QueryResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ]
        },
        "reportStateAndNotification": {
          "description": "Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification about the device. See [Implement Report State](https://developers.google.com/assistant/smarthome/develop/report-state) for more information. This method updates the device state according to its declared [traits](https://developers.google.com/assistant/smarthome/concepts/devices-traits). Publishing a new state value outside of these traits will result in an `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest). This request must be authorized using service account credentials from your Actions console project.",
          "flatPath": "v1/devices:reportStateAndNotification",
          "httpMethod": "POST",
          "id": "homegraph.devices.reportStateAndNotification",
          "parameterOrder": [],
          "parameters": {},
          "path": "v1/devices:reportStateAndNotification",
          "request": {
            "$ref": "ReportStateAndNotificationRequest"
          },
          "response": {
            "$ref": "ReportStateAndNotificationResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ]
        },
        "requestSync": {
          "description": "Requests Google to send an `action.devices.SYNC` [intent](https://developers.google.com/assistant/smarthome/reference/intent/sync) to your smart home Action to update device metadata for the given user. The third-party user's identity is passed via the `agent_user_id` (see RequestSyncDevicesRequest). This request must be authorized using service account credentials from your Actions console project.",
          "flatPath": "v1/devices:requestSync",
          "httpMethod": "POST",
          "id": "homegraph.devices.requestSync",
          "parameterOrder": [],
          "parameters": {},
          "path": "v1/devices:requestSync",
          "request": {
            "$ref": "RequestSyncDevicesRequest"
          },
          "response": {
            "$ref": "RequestSyncDevicesResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ]
        },
        "sync": {
          "description": "Gets all the devices associated with the given third-party user. The third-party user's identity is passed in via the `agent_user_id` (see SyncRequest). This request must be authorized using service account credentials from your Actions console project.",
          "flatPath": "v1/devices:sync",
          "httpMethod": "POST",
          "id": "homegraph.devices.sync",
          "parameterOrder": [],
          "parameters": {},
          "path": "v1/devices:sync",
          "request": {
            "$ref": "SyncRequest"
          },
          "response": {
            "$ref": "SyncResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ]
        }
      }
    }
  },
  "revision": "20211201",
  "rootUrl": "https://homegraph.googleapis.com/",
  "schemas": {
    "AgentDeviceId": {
      "description": "Third-party device ID for one device.",
      "id": "AgentDeviceId",
      "properties": {
        "id": {
          "description": "Third-party device ID.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "AgentOtherDeviceId": {
      "description": "Alternate third-party device ID.",
      "id": "AgentOtherDeviceId",
      "properties": {
        "agentId": {
          "description": "Project ID for your smart home Action.",
          "type": "string"
        },
        "deviceId": {
          "description": "Unique third-party device ID.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Device": {
      "description": "Third-party device definition. Next ID = 14",
      "id": "Device",
      "properties": {
        "attributes": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "description": "Attributes for the traits supported by the device.",
          "type": "object"
        },
        "customData": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "description": "Custom device attributes stored in Home Graph and provided to your smart home Action in each [QUERY](https://developers.google.com/assistant/smarthome/reference/intent/query) and [EXECUTE](https://developers.google.com/assistant/smarthome/reference/intent/execute) intent. Data in this object has a few constraints: No sensitive information, including but not limited to Personally Identifiable Information.",
          "type": "object"
        },
        "deviceInfo": {
          "$ref": "DeviceInfo",
          "description": "Device manufacturer, model, hardware version, and software version."
        },
        "id": {
          "description": "Third-party device ID.",
          "type": "string"
        },
        "name": {
          "$ref": "DeviceNames",
          "description": "Names given to this device by your smart home Action."
        },
        "notificationSupportedByAgent": {
          "description": "Indicates whether your smart home Action will report notifications to Google for this device via ReportStateAndNotification. If your smart home Action enables users to control device notifications, you should update this field and call RequestSyncDevices.",
          "type": "boolean"
        },
        "otherDeviceIds": {
          "description": "Alternate IDs associated with this device. This is used to identify cloud synced devices enabled for [local fulfillment](https://developers.google.com/assistant/smarthome/concepts/local).",
          "items": {
            "$ref": "AgentOtherDeviceId"
          },
          "type": "array"
        },
        "roomHint": {
          "description": "Suggested name for the room where this device is installed. Google attempts to use this value during user setup.",
          "type": "string"
        },
        "structureHint": {
          "description": "Suggested name for the structure where this device is installed. Google attempts to use this value during user setup.",
          "type": "string"
        },
        "traits": {
          "description": "Traits supported by the device. See [device traits](https://developers.google.com/assistant/smarthome/traits).",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": {
          "description": "Hardware type of the device. See [device types](https://developers.google.com/assistant/smarthome/guides).",
          "type": "string"
        },
        "willReportState": {
          "description": "Indicates whether your smart home Action will report state of this device to Google via ReportStateAndNotification.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "DeviceInfo": {
      "description": "Device information.",
      "id": "DeviceInfo",
      "properties": {
        "hwVersion": {
          "description": "Device hardware version.",
          "type": "string"
        },
        "manufacturer": {
          "description": "Device manufacturer.",
          "type": "string"
        },
        "model": {
          "description": "Device model.",
          "type": "string"
        },
        "swVersion": {
          "description": "Device software version.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "DeviceNames": {
      "description": "Identifiers used to describe the device.",
      "id": "DeviceNames",
      "properties": {
        "defaultNames": {
          "description": "List of names provided by the manufacturer rather than the user, such as serial numbers, SKUs, etc.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "name": {
          "description": "Primary name of the device, generally provided by the user.",
          "type": "string"
        },
        "nicknames": {
          "description": "Additional names provided by the user for the device.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Empty": {
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
      "id": "Empty",
      "properties": {},
      "type": "object"
    },
    "QueryRequest": {
      "description": "Request type for the [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call.",
      "id": "QueryRequest",
      "properties": {
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        },
        "inputs": {
          "description": "Required. Inputs containing third-party device IDs for which to get the device states.",
          "items": {
            "$ref": "QueryRequestInput"
          },
          "type": "array"
        },
        "requestId": {
          "description": "Request ID used for debugging.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "QueryRequestInput": {
      "description": "Device ID inputs to QueryRequest.",
      "id": "QueryRequestInput",
      "properties": {
        "payload": {
          "$ref": "QueryRequestPayload",
          "description": "Payload containing third-party device IDs."
        }
      },
      "type": "object"
    },
    "QueryRequestPayload": {
      "description": "Payload containing device IDs.",
      "id": "QueryRequestPayload",
      "properties": {
        "devices": {
          "description": "Third-party device IDs for which to get the device states.",
          "items": {
            "$ref": "AgentDeviceId"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "QueryResponse": {
      "description": "Response type for the [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call. This should follow the same format as the Google smart home `action.devices.QUERY` [response](https://developers.google.com/assistant/smarthome/reference/intent/query). # Example ```json { \"requestId\": \"ff36a3cc-ec34-11e6-b1a0-64510650abcf\", \"payload\": { \"devices\": { \"123\": { \"on\": true, \"online\": true }, \"456\": { \"on\": true, \"online\": true, \"brightness\": 80, \"color\": { \"name\": \"cerulean\", \"spectrumRGB\": 31655 } } } } } ```",
      "id": "QueryResponse",
      "properties": {
        "payload": {
          "$ref": "QueryResponsePayload",
          "description": "Device states for the devices given in the request."
        },
        "requestId": {
          "description": "Request ID used for debugging. Copied from the request.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "QueryResponsePayload": {
      "description": "Payload containing device states information.",
      "id": "QueryResponsePayload",
      "properties": {
        "devices": {
          "additionalProperties": {
            "additionalProperties": {
              "description": "Properties of the object.",
              "type": "any"
            },
            "type": "object"
          },
          "description": "States of the devices. Map of third-party device ID to struct of device states.",
          "type": "object"
        }
      },
      "type": "object"
    },
    "ReportStateAndNotificationDevice": {
      "description": "The states and notifications specific to a device.",
      "id": "ReportStateAndNotificationDevice",
      "properties": {
        "notifications": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "description": "Notifications metadata for devices. See the **Device NOTIFICATIONS** section of the individual trait [reference guides](https://developers.google.com/assistant/smarthome/traits).",
          "type": "object"
        },
        "states": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "description": "States of devices to update. See the **Device STATES** section of the individual trait [reference guides](https://developers.google.com/assistant/smarthome/traits).",
          "type": "object"
        }
      },
      "type": "object"
    },
    "ReportStateAndNotificationRequest": {
      "description": "Request type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) call. It may include states, notifications, or both. States and notifications are defined per `device_id` (for example, \"123\" and \"456\" in the following example). # Example ```json { \"requestId\": \"ff36a3cc-ec34-11e6-b1a0-64510650abcf\", \"agentUserId\": \"1234\", \"payload\": { \"devices\": { \"states\": { \"123\": { \"on\": true }, \"456\": { \"on\": true, \"brightness\": 10 } }, } } } ```",
      "id": "ReportStateAndNotificationRequest",
      "properties": {
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        },
        "eventId": {
          "description": "Unique identifier per event (for example, a doorbell press).",
          "type": "string"
        },
        "followUpToken": {
          "description": "Deprecated.",
          "type": "string"
        },
        "payload": {
          "$ref": "StateAndNotificationPayload",
          "description": "Required. State of devices to update and notification metadata for devices."
        },
        "requestId": {
          "description": "Request ID used for debugging.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ReportStateAndNotificationResponse": {
      "description": "Response type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) call.",
      "id": "ReportStateAndNotificationResponse",
      "properties": {
        "requestId": {
          "description": "Request ID copied from ReportStateAndNotificationRequest.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "RequestSyncDevicesRequest": {
      "description": "Request type for the [`RequestSyncDevices`](#google.home.graph.v1.HomeGraphApiService.RequestSyncDevices) call.",
      "id": "RequestSyncDevicesRequest",
      "properties": {
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        },
        "async": {
          "description": "Optional. If set, the request will be added to a queue and a response will be returned immediately. This enables concurrent requests for the given `agent_user_id`, but the caller will not receive any error responses.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "RequestSyncDevicesResponse": {
      "description": "Response type for the [`RequestSyncDevices`](#google.home.graph.v1.HomeGraphApiService.RequestSyncDevices) call. Intentionally empty upon success. An HTTP response code is returned with more details upon failure.",
      "id": "RequestSyncDevicesResponse",
      "properties": {},
      "type": "object"
    },
    "StateAndNotificationPayload": {
      "description": "Payload containing the state and notification information for devices.",
      "id": "StateAndNotificationPayload",
      "properties": {
        "devices": {
          "$ref": "ReportStateAndNotificationDevice",
          "description": "The devices for updating state and sending notifications."
        }
      },
      "type": "object"
    },
    "SyncRequest": {
      "description": "Request type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call.",
      "id": "SyncRequest",
      "properties": {
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        },
        "requestId": {
          "description": "Request ID used for debugging.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "SyncResponse": {
      "description": "Response type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call. This should follow the same format as the Google smart home `action.devices.SYNC` [response](https://developers.google.com/assistant/smarthome/reference/intent/sync). # Example ```json { \"requestId\": \"ff36a3cc-ec34-11e6-b1a0-64510650abcf\", \"payload\": { \"agentUserId\": \"1836.15267389\", \"devices\": [{ \"id\": \"123\", \"type\": \"action.devices.types.OUTLET\", \"traits\": [ \"action.devices.traits.OnOff\" ], \"name\": { \"defaultNames\": [\"My Outlet 1234\"], \"name\": \"Night light\", \"nicknames\": [\"wall plug\"] }, \"willReportState\": false, \"deviceInfo\": { \"manufacturer\": \"lights-out-inc\", \"model\": \"hs1234\", \"hwVersion\": \"3.2\", \"swVersion\": \"11.4\" }, \"customData\": { \"fooValue\": 74, \"barValue\": true, \"bazValue\": \"foo\" } }] } } ```",
      "id": "SyncResponse",
      "properties": {
        "payload": {
          "$ref": "SyncResponsePayload",
          "description": "Devices associated with the third-party user."
        },
        "requestId": {
          "description": "Request ID used for debugging. Copied from the request.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "SyncResponsePayload": {
      "description": "Payload containing device information.",
      "id": "SyncResponsePayload",
      "properties": {
        "agentUserId": {
          "description": "Third-party user ID",
          "type": "string"
        },
        "devices": {
          "description": "Devices associated with the third-party user.",
          "items": {
            "$ref": "Device"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "servicePath": "",
  "title": "HomeGraph API",
  "version": "v1",
  "version_module": true
}