# REST Resource: devices

- [Resource: AmbientDevice](https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientDevice)
  - [JSON representation](https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientDevice.SCHEMA_REPRESENTATION)
- [AmbientMediaSource](https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientMediaSource)
  - [JSON representation](https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientMediaSource.SCHEMA_REPRESENTATION)
- [PollingConfig](https://developers.google.com/photos/ambient/reference/rest/v1/devices#PollingConfig)
  - [JSON representation](https://developers.google.com/photos/ambient/reference/rest/v1/devices#PollingConfig.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/photos/ambient/reference/rest/v1/devices#METHODS_SUMMARY)

## Resource: AmbientDevice

Representation of an ambient device.

| JSON representation |
|---|
| ``` { "id": string, "displayName": string, "mediaSources": [ { object (`https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientMediaSource`) } ], "settingsUri": string, "createTime": string, "pollingConfig": { object (`https://developers.google.com/photos/ambient/reference/rest/v1/devices#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 (`https://developers.google.com/photos/ambient/reference/rest/v1/devices#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 (`https://protobuf.dev/reference/protobuf/google.protobuf#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 (`https://developers.google.com/photos/ambient/reference/rest/v1/devices#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 (`https://protobuf.dev/reference/protobuf/google.protobuf#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 ||
|---|---|
| ### `https://developers.google.com/photos/ambient/reference/rest/v1/devices/create` | Creates an ambient device in the user's Google Photos account. |
| ### `https://developers.google.com/photos/ambient/reference/rest/v1/devices/delete` | Removes the specified device from to the user's Google Photos account. |
| ### `https://developers.google.com/photos/ambient/reference/rest/v1/devices/get` | Retrieves information about the specified device. |
| ### `https://developers.google.com/photos/ambient/reference/rest/v1/devices/patch` | Updates information about the specified device. |