devices

POST /v1/devices:reportStateAndNotification

Changed on

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 for more information. This method updates the device state according to its declared 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

  • Base URL
    https://homegraph.googleapis.com
  • URL
    https://homegraph.googleapis.com/v1/devices:reportStateAndNotification
  • Auth
    OAuth 2 and OAuth 2
    Implicit: https://accounts.google.com/o/oauth2/auth
    Scopes: https://www.googleapis.com/auth/homegraph
    Authorization code: https://accounts.google.com/o/oauth2/auth
    Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/homegraph

Request body

agentUserIdstring

Required. Third-party user ID.

eventIdstring

Unique identifier per event (for example, a doorbell press).

followUpTokenstring

Deprecated.

requestIdstring

Request ID used for debugging.

Response

Successful response

deviceResultsobject

Map from agent device ID to the result of reporting state and notifications. This is only populated for UDDM updates for now.

requestIdstring

Request ID copied from ReportStateAndNotificationRequest.

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

      added the new optional request property ////////

    • info

      added the optional property to the response with the status