{
  "parameters": {
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "access_token": {
      "description": "OAuth access token.",
      "location": "query",
      "type": "string"
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "location": "query",
      "type": "string"
    },
    "$.xgafv": {
      "description": "V1 error format.",
      "type": "string",
      "location": "query",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "enum": [
        "1",
        "2"
      ]
    },
    "quotaUser": {
      "type": "string",
      "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"
    },
    "callback": {
      "type": "string",
      "location": "query",
      "description": "JSONP"
    },
    "prettyPrint": {
      "default": "true",
      "location": "query",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks."
    },
    "alt": {
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "description": "Data format for response.",
      "type": "string",
      "location": "query"
    },
    "fields": {
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string"
    },
    "key": {
      "location": "query",
      "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.",
      "type": "string"
    }
  },
  "servicePath": "",
  "canonicalName": "Home Graph Service",
  "protocol": "rest",
  "ownerDomain": "google.com",
  "discoveryVersion": "v1",
  "version": "v1",
  "name": "homegraph",
  "ownerName": "Google",
  "kind": "discovery#restDescription",
  "revision": "20261108",
  "documentationLink": "https://developers.home.google.com/cloud-to-cloud/get-started",
  "description": "",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/homegraph": {
          "description": "Private Service: https://www.googleapis.com/auth/homegraph"
        }
      }
    }
  },
  "baseUrl": "https://homegraph.googleapis.com/",
  "fullyEncodeReservedExpansion": true,
  "schemas": {
    "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.",
      "properties": {},
      "type": "object",
      "id": "RequestSyncDevicesResponse"
    },
    "QueryRequest": {
      "properties": {
        "deviceView": {
          "enumDescriptions": [
            "Default value. Equivalent to `SMART_HOME_TRAIT_ONLY`.",
            "Return only standard Smart Home traits in the `devices` map.",
            "Return only Unified Device Data Model (UDDM) traits in the `home_trait_payload` map.",
            "Return both standard Smart Home traits and UDDM traits.",
            "Return all component traits in `JsonTrait` format (`TraitData.json_trait` in `home_trait_payload`), converting persisted UDDM traits to `JsonTrait` on read."
          ],
          "type": "string",
          "enum": [
            "DEVICE_VIEW_UNSPECIFIED",
            "SMART_HOME_TRAIT_ONLY",
            "HOME_TRAIT_ONLY",
            "HOME_TRAIT_AND_SMART_HOME_TRAIT",
            "JSON_TRAIT_ONLY"
          ],
          "description": "Optional. Specifies the type of device data to be returned in the response. This allows callers to request traditional Smart Home traits, Unified Device Data Model (UDDM) traits, or both. If unspecified, defaults to `SMART_HOME_TRAIT_ONLY`."
        },
        "inputs": {
          "description": "Required. Inputs containing third-party device IDs for which to get the device states.",
          "type": "array",
          "items": {
            "$ref": "QueryRequestInput"
          }
        },
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        },
        "includeDeviceMetadata": {
          "type": "boolean",
          "description": "Optional. If true, the response will include device metadata in the device_metadata field."
        },
        "requestId": {
          "description": "Request ID used for debugging.",
          "type": "string"
        }
      },
      "type": "object",
      "id": "QueryRequest",
      "description": "Request type for the [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call."
    },
    "QueryRequestInput": {
      "properties": {
        "payload": {
          "$ref": "QueryRequestPayload",
          "description": "Payload containing third-party device IDs."
        }
      },
      "id": "QueryRequestInput",
      "description": "Device ID inputs to QueryRequest.",
      "type": "object"
    },
    "QueryResponse": {
      "properties": {
        "payload": {
          "description": "Device states for the devices given in the request.",
          "$ref": "QueryResponsePayload"
        },
        "requestId": {
          "description": "Request ID used for debugging. Copied from the request.",
          "type": "string"
        }
      },
      "id": "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.home.google.com/cloud-to-cloud/intents/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 } } } } } ```",
      "type": "object"
    },
    "CameraEventStreamTrait": {
      "id": "CameraEventStreamTrait",
      "properties": {},
      "description": "This cluster defines the camera event stream used by GHP for their Cloud-to-Cloud eventing flow",
      "type": "object"
    },
    "HomeTraitUpdates": {
      "id": "HomeTraitUpdates",
      "description": "Contains the set of updates for a device.",
      "properties": {
        "deviceId": {
          "description": "Required. Unique identifier for the device.",
          "type": "string"
        },
        "components": {
          "description": "Required. Trait updates for each component.",
          "type": "array",
          "items": {
            "$ref": "ComponentTraitUpdates"
          }
        }
      },
      "type": "object"
    },
    "UserBlameStruct": {
      "type": "object",
      "id": "UserBlameStruct",
      "description": "Contains metadata about the cause of presence state change attributed to a user.",
      "properties": {
        "blameType": {
          "description": "Required. Specifies the user blame type.",
          "type": "string",
          "enum": [
            "USER_BLAME_TYPE_ENUM_UNSPECIFIED",
            "PHONE_LOCATION",
            "MANUAL_CHANGE"
          ],
          "enumDescriptions": [
            "Indicates an unspecified user blame type.",
            "Indicates phone location.",
            "Indicates manual change."
          ]
        },
        "userEmail": {
          "type": "string",
          "description": "Required. Specifies the email of the user."
        }
      }
    },
    "SyncResponsePayload": {
      "id": "SyncResponsePayload",
      "properties": {
        "agentUserId": {
          "type": "string",
          "description": "Third-party user ID"
        },
        "devices": {
          "items": {
            "$ref": "Device"
          },
          "description": "Devices associated with the third-party user.",
          "type": "array"
        }
      },
      "type": "object",
      "description": "Payload containing device information."
    },
    "ReportStateAndNotificationDevice": {
      "properties": {
        "homeEvents": {
          "items": {
            "$ref": "HomeEvents"
          },
          "type": "array",
          "description": "Optional. UDDM/WHDM trait events"
        },
        "notifications": {
          "description": "Notifications metadata for devices. See the **Device NOTIFICATIONS** section of the individual trait [reference guides](https://developers.home.google.com/cloud-to-cloud/traits).",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "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.home.google.com/cloud-to-cloud/traits).",
          "type": "object"
        },
        "homeTraits": {
          "type": "array",
          "description": "Optional. UDDM/WHDM trait updates.",
          "items": {
            "$ref": "HomeTraitUpdates"
          }
        }
      },
      "type": "object",
      "description": "The states and notifications specific to a device.",
      "id": "ReportStateAndNotificationDevice"
    },
    "StructurePresenceStateChangeEvent": {
      "type": "object",
      "properties": {
        "reason": {
          "description": "Optional. Specifies the presence state change reason.",
          "$ref": "StructurePresenceStateChangeReasonStruct"
        },
        "presenceState": {
          "enumDescriptions": [
            "Indicates an unknown presence state.",
            "Indicates home presence state.",
            "Indicates away presence state."
          ],
          "type": "string",
          "enum": [
            "STRUCTURE_PRESENCE_STATE_ENUM_UNSPECIFIED",
            "HOME",
            "AWAY"
          ],
          "description": "Required. Specifies the presence state."
        }
      },
      "description": "Sent when the structure presence state changes.",
      "id": "StructurePresenceStateChangeEvent"
    },
    "QueryRequestPayload": {
      "description": "Payload containing device IDs.",
      "id": "QueryRequestPayload",
      "type": "object",
      "properties": {
        "devices": {
          "description": "Third-party device IDs for which to get the device states.",
          "items": {
            "$ref": "AgentDeviceId"
          },
          "type": "array"
        }
      }
    },
    "StructurePresenceStateChangeReasonStruct": {
      "description": "Contains the metadata about the cause of the structure presence state change.",
      "type": "object",
      "id": "StructurePresenceStateChangeReasonStruct",
      "properties": {
        "userBlame": {
          "$ref": "UserBlameStruct",
          "description": "Optional. Contains metadata about the cause of presence state change attributed to a user."
        },
        "deviceBlame": {
          "description": "Optional. Contains metadata about the cause of presence state change attributed to a device.",
          "$ref": "DeviceBlameStruct"
        }
      }
    },
    "EveUtilityTrait": {
      "properties": {
        "loggingMetadata": {
          "readOnly": true,
          "format": "byte",
          "type": "string"
        },
        "holdPosition": {
          "type": "boolean"
        },
        "lastEventTime": {
          "format": "int64",
          "readOnly": true,
          "type": "string"
        },
        "openCount": {
          "type": "string",
          "format": "int64"
        },
        "wattAccumulated": {
          "readOnly": true,
          "format": "double",
          "type": "number"
        },
        "motionSensitivity": {
          "format": "int32",
          "type": "integer"
        },
        "weatherTrend": {
          "type": "integer",
          "readOnly": true,
          "format": "int32"
        },
        "loggingControlPoint": {
          "format": "byte",
          "type": "string"
        },
        "accumulatedControlPoint": {
          "type": "string",
          "format": "int64"
        },
        "current": {
          "format": "double",
          "type": "number",
          "readOnly": true
        },
        "setConfig": {
          "type": "string",
          "format": "byte"
        },
        "altitude": {
          "type": "number",
          "format": "double"
        },
        "loggingTime": {
          "type": "string",
          "format": "byte"
        },
        "watt": {
          "format": "double",
          "type": "number",
          "readOnly": true
        },
        "loggingData": {
          "format": "byte",
          "type": "string",
          "readOnly": true
        },
        "getConfig": {
          "format": "byte",
          "readOnly": true,
          "type": "string"
        },
        "airPressure": {
          "type": "number",
          "format": "double",
          "readOnly": true
        },
        "obstructionDetected": {
          "readOnly": true,
          "type": "boolean"
        },
        "childLock": {
          "type": "boolean"
        },
        "voltage": {
          "readOnly": true,
          "format": "double",
          "type": "number"
        },
        "rloc16": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        },
        "acceptedCommandList": {
          "items": {
            "type": "string",
            "enum": [
              "COMMANDS_UNSPECIFIED"
            ],
            "enumDescriptions": [
              "Deprecated: This enum exists only to conform to AIP guidelines and should never be used."
            ],
            "enumDeprecated": [
              true
            ]
          },
          "readOnly": true,
          "type": "array",
          "description": "Required. Output only. Accepted command list for this trait"
        },
        "statusFault": {
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        }
      },
      "id": "EveUtilityTrait",
      "type": "object"
    },
    "HomeTraitPayload": {
      "description": "Container for UDDM or JSON trait data associated with a device.",
      "properties": {
        "rootComponent": {
          "description": "The root component of the device as reported by the provider.",
          "$ref": "Component"
        }
      },
      "id": "HomeTraitPayload",
      "type": "object"
    },
    "DeviceMetadata": {
      "type": "object",
      "properties": {
        "traitCommitTimestamps": {
          "description": "Map from the Trait ID (e.g., \"action.devices.traits.OnOff\") to its last Spanner commit timestamp.",
          "type": "object",
          "additionalProperties": {
            "format": "google-datetime",
            "type": "string"
          }
        }
      },
      "description": "Metadata for traits of a single device.",
      "id": "DeviceMetadata"
    },
    "SyncRequest": {
      "properties": {
        "requestId": {
          "type": "string",
          "description": "Request ID used for debugging."
        },
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        }
      },
      "type": "object",
      "id": "SyncRequest",
      "description": "Request type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call."
    },
    "ZoneStruct": {
      "id": "ZoneStruct",
      "properties": {
        "zoneId": {
          "type": "string",
          "description": "Id of the zone",
          "format": "int64"
        },
        "label": {
          "description": "Name of the zone.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ThermostatFanControlTrait": {
      "description": "This cluster provides fan control capabilities for thermostats.",
      "id": "ThermostatFanControlTrait",
      "type": "object",
      "properties": {
        "timerEnd": {
          "type": "string",
          "format": "int64"
        },
        "timerDuration": {
          "type": "string",
          "format": "int64"
        },
        "timerSpeed": {
          "type": "string",
          "enum": [
            "FAN_SPEED_SETTING_ENUM_UNSPECIFIED",
            "FAN_SPEED_SETTING_OFF",
            "FAN_SPEED_SETTING_STAGE1",
            "FAN_SPEED_SETTING_STAGE2",
            "FAN_SPEED_SETTING_STAGE3",
            "FAN_SPEED_SETTING_AUTO"
          ],
          "enumDescriptions": [
            "",
            "",
            "",
            "",
            "",
            ""
          ]
        }
      }
    },
    "TraitData": {
      "type": "object",
      "id": "TraitData",
      "description": "Contains the trait payload for a single trait.",
      "properties": {
        "providerUpdateTime": {
          "format": "google-datetime",
          "type": "string",
          "description": "The custom timestamp supplied by the provider during a ReportStateAndNotification update (if provided). This field is returned as part of the `QueryResponse`."
        },
        "commitTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Other metadata for the trait. The time the client update was committed in the server."
        },
        "trait": {
          "description": "The Provider Home API trait payload.",
          "type": "object",
          "additionalProperties": {
            "description": "Properties of the object. Contains field @type with type URL.",
            "type": "any"
          }
        },
        "jsonTrait": {
          "description": "Contains the dynamic JSON trait payload.",
          "$ref": "JsonTrait"
        }
      }
    },
    "Empty": {
      "id": "Empty",
      "properties": {},
      "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); }",
      "type": "object"
    },
    "Device": {
      "type": "object",
      "properties": {
        "otherDeviceIds": {
          "description": "Alternate IDs associated with this device. This is used to identify cloud synced devices enabled for [local fulfillment](https://developers.home.google.com/local-home/overview).",
          "type": "array",
          "items": {
            "$ref": "AgentOtherDeviceId"
          }
        },
        "name": {
          "description": "Names given to this device by your smart home Action.",
          "$ref": "DeviceNames"
        },
        "customData": {
          "description": "Custom device attributes stored in Home Graph and provided to your smart home Action in each [QUERY](https://developers.home.google.com/cloud-to-cloud/intents/query) and [EXECUTE](https://developers.home.google.com/cloud-to-cloud/intents/execute) intent. Data in this object has a few constraints: No sensitive information, including but not limited to Personally Identifiable Information.",
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "type": "object"
        },
        "structureHint": {
          "description": "Suggested name for the structure where this device is installed. Google attempts to use this value during user setup.",
          "type": "string"
        },
        "id": {
          "description": "Third-party device ID.",
          "type": "string"
        },
        "deviceInfo": {
          "$ref": "DeviceInfo",
          "description": "Device manufacturer, model, hardware version, and software version."
        },
        "attributes": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "description": "Attributes for the traits supported by the device.",
          "type": "object"
        },
        "willReportState": {
          "type": "boolean",
          "description": "Indicates whether your smart home Action will report state of this device to Google via ReportStateAndNotification."
        },
        "roomHint": {
          "description": "Suggested name for the room where this device is installed. Google attempts to use this value during user setup.",
          "type": "string"
        },
        "type": {
          "description": "Hardware type of the device. See [device types](https://developers.home.google.com/cloud-to-cloud/guides).",
          "type": "string"
        },
        "traits": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Traits supported by the device. See [device traits](https://developers.home.google.com/cloud-to-cloud/traits)."
        },
        "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"
        }
      },
      "id": "Device",
      "description": "Third-party device definition."
    },
    "EventData": {
      "description": "Contains the details for a single event.",
      "type": "object",
      "id": "EventData",
      "properties": {
        "eventId": {
          "description": "Required. The unique event ID from the device provider.",
          "type": "string"
        },
        "eventTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Required. The timestamp of the event."
        },
        "jsonTraitEvent": {
          "description": "Optional. Contains the dynamic JSON trait event payload.",
          "$ref": "JsonTraitEvent"
        },
        "event": {
          "type": "object",
          "description": "Optional. The actual event payload.",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          }
        }
      }
    },
    "RequestSyncDevicesRequest": {
      "description": "Request type for the [`RequestSyncDevices`](#google.home.graph.v1.HomeGraphApiService.RequestSyncDevices) call.",
      "type": "object",
      "properties": {
        "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"
        },
        "agentUserId": {
          "type": "string",
          "description": "Required. Third-party user ID."
        }
      },
      "id": "RequestSyncDevicesRequest"
    },
    "DeviceBlameStruct": {
      "description": "Contains metadata about the cause of presence state change attributed to a device.",
      "id": "DeviceBlameStruct",
      "properties": {
        "blameType": {
          "description": "Required. Specifies the device blame type.",
          "enumDescriptions": [
            "Indicates an unspecified device blame type.",
            "Indicates lock interaction.",
            "Indicates unlock interaction.",
            "Indicates motion detection.",
            "Indicates touch interaction.",
            "Indicates voice interaction."
          ],
          "type": "string",
          "enum": [
            "DEVICE_BLAME_TYPE_ENUM_UNSPECIFIED",
            "LOCK",
            "UNLOCK",
            "MOTION_DETECTION",
            "TOUCH_INTERACTION",
            "VOICE_INTERACTION"
          ]
        }
      },
      "type": "object"
    },
    "HomeEvents": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "$ref": "Events"
          },
          "description": "Required. List of events for the item."
        },
        "deviceId": {
          "description": "Required. / Unique identifier for the device.",
          "type": "string"
        }
      },
      "description": "Contains the set of events for an item.",
      "id": "HomeEvents"
    },
    "JsonTrait": {
      "description": "Represents a dynamic JSON trait state payload that conforms to `json_trait_schema.md`. This message is used for Category 2 (vendor Matter clusters) and Category 3 (non-Matter capabilities) traits across all wire and internal paths, and for Category 1 traits on external JSON-only wire paths (for example, `Query` with `JSON_TRAIT_ONLY`).",
      "properties": {
        "id": {
          "type": "string",
          "description": "Required. Identifies the trait by its canonical four-segment capability ID, `capability...`: * Standard or Google Matter (Category 1): `capability.matter.standard.` or `capability.matter.google.`, for example `capability.matter.standard.Thermostat`. * Vendor Matter (Category 2): `capability.matter..`. * Non-Matter (Category 3, from any provider including Google): `capability.generic..`, for example `capability.generic.acme.Warranty`."
        },
        "data": {
          "additionalProperties": {
            "description": "Properties of the object.",
            "type": "any"
          },
          "type": "object",
          "description": "Optional. Holds the trait attributes, which conform to the trait's registered JSON Schema."
        }
      },
      "type": "object",
      "id": "JsonTrait"
    },
    "CommonEventDataStruct": {
      "description": "Common camera event data.",
      "type": "object",
      "id": "CommonEventDataStruct",
      "properties": {
        "trackId": {
          "type": "string",
          "description": "Id of the track this object belongs to"
        },
        "mediaUrls": {
          "description": "Contains media urls for the event",
          "$ref": "MediaUrlsStruct"
        },
        "sessionId": {
          "description": "Camera event session id. Used for identifying a unique event session",
          "type": "string"
        }
      }
    },
    "MediaUrlsStruct": {
      "id": "MediaUrlsStruct",
      "type": "object",
      "properties": {
        "previewUrl": {
          "type": "string",
          "description": "URL for animated preview clip representing the event session"
        },
        "dashManifestUrl": {
          "description": "URL for a dash manifest for playback",
          "type": "string"
        },
        "hlsMasterPlaylistUrl": {
          "type": "string",
          "description": "URL for a hls master playlist for playback"
        },
        "thumbnailUrl": {
          "description": "URL for thumbnail image representing the event session",
          "type": "string"
        }
      }
    },
    "AgentOtherDeviceId": {
      "description": "Alternate third-party device ID.",
      "type": "object",
      "id": "AgentOtherDeviceId",
      "properties": {
        "deviceId": {
          "description": "Unique third-party device ID.",
          "type": "string"
        },
        "agentId": {
          "description": "Project ID for your smart home Action.",
          "type": "string"
        }
      }
    },
    "StateAndNotificationPayload": {
      "id": "StateAndNotificationPayload",
      "description": "Payload containing the state and notification information for devices.",
      "type": "object",
      "properties": {
        "devices": {
          "$ref": "ReportStateAndNotificationDevice",
          "description": "The devices for updating state and sending notifications."
        }
      }
    },
    "ReportStateAndNotificationRequest": {
      "id": "ReportStateAndNotificationRequest",
      "type": "object",
      "properties": {
        "eventId": {
          "description": "Unique identifier per event (for example, a doorbell press).",
          "type": "string"
        },
        "requestId": {
          "description": "Request ID used for debugging.",
          "type": "string"
        },
        "agentUserId": {
          "description": "Required. Third-party user ID.",
          "type": "string"
        },
        "payload": {
          "description": "Required. State of devices to update and notification metadata for devices.",
          "$ref": "StateAndNotificationPayload"
        },
        "followUpToken": {
          "description": "Deprecated.",
          "deprecated": true,
          "type": "string"
        }
      },
      "description": "Request type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) call. It may include states, notifications, home_traits, home_events, or any combination thereof. Smart Home Device Traits (SHDT) `states` and `notifications` are defined per `device_id` (for example, \"123\" and \"456\" in the following example). Google Home Traits `home_traits` and `home_events` are lists of updates or events, each associated with a `device_id` (for example, \"789\" 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 }, }, \"homeTraits\": [ { \"deviceId\": \"789\", \"components\": [ { \"componentId\": \"main\", \"traitData\": [ { \"trait\": { \"@type\": \"type.googleapis.com/home.graph.v1.OnOffTrait\", \"onOff\": true } } ] } ] } ], \"homeEvents\": [ { \"deviceId\": \"789\", \"events\": [ { \"componentId\": \"main\", \"events\": [ { \"eventId\": \"event-123\", \"eventTime\": \"2026-01-01T00:00:00Z\", \"event\": { \"@type\": \"type.googleapis.com/home.graph.v1.DoorbellPressTrait.DoorbellPressedEvent\" } } ] } ] } ] } } } ```"
    },
    "Component": {
      "type": "object",
      "description": "Component of a provider device.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Required. ID of the component from the device provider."
        },
        "traitData": {
          "items": {
            "$ref": "TraitData"
          },
          "description": "Required. List of trait data associated with the component.",
          "type": "array"
        },
        "deviceTypes": {
          "description": "Required. List of Device types associated with this component. Supported device types are defined in cs//depot/google3/home/homeservicelayer/uddm/types/uddm_device_types.proto and the type string is the enum name, for example: ON_OFF_LIGHT =\u003e \"ON_OFF_LIGHT\".",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "childComponents": {
          "description": "Optional. Child components.",
          "type": "array",
          "items": {
            "$ref": "Component"
          }
        }
      },
      "id": "Component"
    },
    "DeviceNames": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Primary name of the device, generally provided by the user. Names will be truncated if over the 60 Unicode code point (character) limit and no errors will be thrown. Developers are responsible for handling long names."
        },
        "nicknames": {
          "type": "array",
          "description": "Additional names provided by the user for the device.",
          "items": {
            "type": "string"
          }
        },
        "defaultNames": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "List of names provided by the manufacturer rather than the user, such as serial numbers, SKUs, etc."
        }
      },
      "id": "DeviceNames",
      "description": "Identifiers used to describe the device."
    },
    "PartnerPresenceSignalTrait": {
      "properties": {},
      "description": "Provides attributes and events related to partner presence signals. See PartnerPresenceSignal trait:",
      "type": "object",
      "id": "PartnerPresenceSignalTrait"
    },
    "MotionEvent": {
      "description": "Represents a newly detected motion event.",
      "properties": {
        "commonEventData": {
          "$ref": "CommonEventDataStruct"
        },
        "zonesIsEmpty": {
          "description": "If set, zones is an empty list.",
          "type": "boolean"
        },
        "zones": {
          "description": "Zones where events are detected in.",
          "items": {
            "$ref": "ZoneStruct"
          },
          "type": "array"
        }
      },
      "id": "MotionEvent",
      "type": "object"
    },
    "PersonEvent": {
      "type": "object",
      "properties": {
        "commonEventData": {
          "$ref": "CommonEventDataStruct"
        },
        "zones": {
          "type": "array",
          "description": "Zones where events are detected in.",
          "items": {
            "$ref": "ZoneStruct"
          }
        },
        "zonesIsEmpty": {
          "description": "If set, zones is an empty list.",
          "type": "boolean"
        }
      },
      "description": "Represents a newly detected person event.",
      "id": "PersonEvent"
    },
    "DeviceInfo": {
      "properties": {
        "model": {
          "description": "Device model.",
          "type": "string"
        },
        "manufacturer": {
          "type": "string",
          "description": "Device manufacturer."
        },
        "hwVersion": {
          "description": "Device hardware version.",
          "type": "string"
        },
        "swVersion": {
          "type": "string",
          "description": "Device software version."
        }
      },
      "description": "Device information.",
      "type": "object",
      "id": "DeviceInfo"
    },
    "QueryResponsePayload": {
      "properties": {
        "devices": {
          "description": "States of the devices. Map of third-party device ID to struct of device states.",
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "description": "Properties of the object.",
              "type": "any"
            }
          }
        },
        "homeTraitPayload": {
          "description": "Map of device IDs to their Unified Device Data Model (UDDM) or JSON trait payloads. This field is populated when `device_view` is set to `HOME_TRAIT_ONLY`, `HOME_TRAIT_AND_SMART_HOME_TRAIT`, or `JSON_TRAIT_ONLY`.",
          "additionalProperties": {
            "$ref": "HomeTraitPayload"
          },
          "type": "object"
        },
        "deviceMetadata": {
          "description": "Map from the Trait ID (e.g., \"action.devices.traits.OnOff\") to its last Spanner commit timestamp. If a trait has no recorded timestamp, it will be omitted from this map.",
          "type": "object",
          "additionalProperties": {
            "$ref": "DeviceMetadata"
          }
        }
      },
      "type": "object",
      "id": "QueryResponsePayload",
      "description": "Payload containing device states information."
    },
    "JsonTraitEvent": {
      "description": "Represents a dynamic JSON event payload that conforms to `json_trait_schema.md`.",
      "type": "object",
      "id": "JsonTraitEvent",
      "properties": {
        "id": {
          "type": "string",
          "description": "Required. Identifies the event as `.`, where `` is the PascalCase key in the schema's `x-capability-info.events`, for example `capability.matter.standard.DoorLock.LockOperation` or `capability.generic.acme.Warranty.ClaimUpdated`."
        },
        "data": {
          "description": "Optional. Holds the event payload fields, which conform to the event's registered JSON Schema.",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "type": "object"
        }
      }
    },
    "Events": {
      "type": "object",
      "id": "Events",
      "description": "Contains a set of events for a specific component.",
      "properties": {
        "events": {
          "items": {
            "$ref": "EventData"
          },
          "description": "Required. List of events associated with the component.",
          "type": "array"
        },
        "componentId": {
          "description": "Optional. The ID of the provider component if the events are associated with a specific component. Optional for WHDM events, required for UDDM and JSON events.",
          "type": "string"
        }
      }
    },
    "Result": {
      "id": "Result",
      "properties": {
        "homeTraitCommitTime": {
          "format": "google-datetime",
          "description": "The trait commit timestamp of the state update in Home Graph.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Result of reporting state and notifications for a single device."
    },
    "AgentDeviceId": {
      "description": "Third-party device ID for one device.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Third-party device ID."
        }
      },
      "type": "object",
      "id": "AgentDeviceId"
    },
    "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.home.google.com/cloud-to-cloud/intents/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": {
        "requestId": {
          "description": "Request ID used for debugging. Copied from the request.",
          "type": "string"
        },
        "payload": {
          "description": "Devices associated with the third-party user.",
          "$ref": "SyncResponsePayload"
        }
      },
      "type": "object"
    },
    "ReportStateAndNotificationResponse": {
      "properties": {
        "requestId": {
          "description": "Request ID copied from ReportStateAndNotificationRequest.",
          "type": "string"
        },
        "deviceResults": {
          "type": "object",
          "additionalProperties": {
            "$ref": "Result"
          },
          "description": "Map from agent device ID to the result of reporting state and notifications. This is only populated for UDDM updates for now."
        }
      },
      "type": "object",
      "id": "ReportStateAndNotificationResponse",
      "description": "Response type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) call."
    },
    "ComponentTraitUpdates": {
      "description": "Contains the set of updates for a component.",
      "id": "ComponentTraitUpdates",
      "type": "object",
      "properties": {
        "componentId": {
          "description": "Required. ID of the component from the device provider.",
          "type": "string"
        },
        "traitData": {
          "items": {
            "$ref": "TraitData"
          },
          "type": "array",
          "description": "Required. The updated trait data for the component."
        }
      }
    }
  },
  "basePath": "",
  "id": "homegraph:v1",
  "mtlsRootUrl": "https://homegraph.mtls.googleapis.com/",
  "title": "HomeGraph API",
  "batchPath": "batch",
  "resources": {
    "agentUsers": {
      "methods": {
        "delete": {
          "flatPath": "v1/agentUsers/{agentUsersId}",
          "parameters": {
            "requestId": {
              "location": "query",
              "description": "Request ID used for debugging.",
              "type": "string"
            },
            "agentUserId": {
              "required": true,
              "description": "Required. Third-party user ID.",
              "location": "path",
              "pattern": "^agentUsers/.*$",
              "type": "string"
            }
          },
          "id": "homegraph.agentUsers.delete",
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "response": {
            "$ref": "Empty"
          },
          "parameterOrder": [
            "agentUserId"
          ],
          "path": "v1/{+agentUserId}",
          "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.home.google.com/cloud-to-cloud/primer/fulfillment). 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.",
          "httpMethod": "DELETE"
        }
      }
    },
    "devices": {
      "methods": {
        "sync": {
          "response": {
            "$ref": "SyncResponse"
          },
          "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.",
          "httpMethod": "POST",
          "flatPath": "v1/devices:sync",
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "id": "homegraph.devices.sync",
          "parameterOrder": [],
          "parameters": {},
          "path": "v1/devices:sync",
          "request": {
            "$ref": "SyncRequest"
          }
        },
        "query": {
          "id": "homegraph.devices.query",
          "parameters": {},
          "parameterOrder": [],
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "request": {
            "$ref": "QueryRequest"
          },
          "path": "v1/devices: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.",
          "response": {
            "$ref": "QueryResponse"
          },
          "flatPath": "v1/devices:query",
          "httpMethod": "POST"
        },
        "requestSync": {
          "httpMethod": "POST",
          "flatPath": "v1/devices:requestSync",
          "id": "homegraph.devices.requestSync",
          "path": "v1/devices:requestSync",
          "response": {
            "$ref": "RequestSyncDevicesResponse"
          },
          "request": {
            "$ref": "RequestSyncDevicesRequest"
          },
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "parameterOrder": [],
          "parameters": {},
          "description": "Requests Google to send an `action.devices.SYNC` [intent](https://developers.home.google.com/cloud-to-cloud/intents/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."
        },
        "reportStateAndNotification": {
          "httpMethod": "POST",
          "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.home.google.com/cloud-to-cloud/integration/report-state) for more information. This method updates the device state according to its declared [traits](https://developers.home.google.com/cloud-to-cloud/primer/device-types-and-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.",
          "request": {
            "$ref": "ReportStateAndNotificationRequest"
          },
          "scopes": [
            "https://www.googleapis.com/auth/homegraph"
          ],
          "path": "v1/devices:reportStateAndNotification",
          "response": {
            "$ref": "ReportStateAndNotificationResponse"
          },
          "parameterOrder": [],
          "flatPath": "v1/devices:reportStateAndNotification",
          "parameters": {},
          "id": "homegraph.devices.reportStateAndNotification"
        }
      }
    }
  },
  "rootUrl": "https://homegraph.googleapis.com/",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "version_module": true
}
