REST Resource: devices

  • Ambient devices are represented with a unique ID, user-defined display name, settings URI, creation timestamp, polling configuration, and a flag indicating if media sources have been set.

  • The PollingConfig resource suggests the recommended time interval, defined in seconds, between requests to the API for polling purposes.

  • There are methods available to create, delete, get, and patch ambient devices, corresponding to adding, removing, retrieving info about and updating devices, respectively.

  • The settingsUri is an output only field which corresponds to the link that is used to redirect a user to the settings of a device within the Google Photos app.

Resource: AmbientDevice

Representation of an ambient device.

JSON representation
{
  "id": string,
  "displayName": string,
  "mediaSources": [
    {
      object (AmbientMediaSource)
    }
  ],
  "settingsUri": string,
  "createTime": string,
  "pollingConfig": {
    object (PollingConfig)
  },
  "mediaSourcesSet": boolean
}
Fields
id

string

Output only. The unique identifier for this device.

displayName

string

Required. A user-defined display name for this device.

This will be visible to users from the Google Photos app settings but only editable through this API.

Valid display names must have between 1 and 100 characters (inclusive).

mediaSources[]

object (AmbientMediaSource)

Output only. The media sources set for this device.

Media sources are albums or photo collections the user selects to display on a device.

Note that this will be empty if the user has not selected any media sources for this device (i.e mediaSourcesSet = false).

settingsUri

string

Output only. The URI used to redirect the user to the device's settings within the Google Photos app.

createTime

string (Timestamp format)

Output only. The time this device was created.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

pollingConfig

object (PollingConfig)

Output only. The recommended configuration that applications should use while polling devices.get.

mediaSourcesSet

boolean

Output only. If set, media sources have been configured for this device and clients should be able to request a list of media items for this device.

AmbientMediaSource

Represents a media source a user has selected for an ambient device.

JSON representation
{
  "id": string,
  "displayName": string
}
Fields
id

string

Output only. Identifier of the ambient media source.

displayName

string

Output only. Display name for this media source.

PollingConfig

Configuration for polling the API.

JSON representation
{
  "pollInterval": string
}
Fields
pollInterval

string (Duration format)

Output only. Recommended time between poll requests.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Methods

create

Creates an ambient device in the user's Google Photos account.

delete

Removes the specified device from to the user's Google Photos account.

get

Retrieves information about the specified device.

patch

Updates information about the specified device.