Method: devices.patch

  • This page details how to update information for a specific device using a PATCH HTTP request to the given endpoint.

  • The request requires a deviceId path parameter to identify the device being updated, and it can include an optional updateMask query parameter to specify which device fields should be modified.

  • The updateMask can be used to update certain fields of the AmbientDevice such as the displayName of the device.

  • The request body should contain an instance of AmbientDevice, and if successful, the response body will also contain an instance of AmbientDevice with the updated data.

  • This operation requires the OAuth scope https://www.googleapis.com/auth/photosambient.mediaitems for authorization.

Updates information about the specified device.

A NOT_FOUND error is returned if the device does not exist or is not owned by the user.

HTTP request

PATCH https://photosambient.googleapis.com/v1/devices/{deviceId}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
deviceId

string

Required. The unique identifier for this device.

Query parameters

Parameters
updateMask

string (FieldMask format)

Optional. The list of AmbientDevice fields to update.

For example, to update the device's displayName, the field path userSettings.displayName must be provided in the request's updateMask.

The special value * may be used to indicate that all fields (that can be updated) should be updated.

If omitted, an implied field mask equivalent to all fields that are populated in device (i.e., have a non-empty value) will be used instead.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Request body

The request body contains an instance of AmbientDevice.

Response body

If successful, the response body contains an instance of AmbientDevice.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/photosambient.mediaitems