# REST Resource: snapshots

- [Resource: Snapshot](https://developer.android.com/games/services/web/api/rest/v1/snapshots#Snapshot)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/snapshots#Snapshot.SCHEMA_REPRESENTATION)
- [SnapshotType](https://developer.android.com/games/services/web/api/rest/v1/snapshots#SnapshotType)
- [SnapshotImage](https://developer.android.com/games/services/web/api/rest/v1/snapshots#SnapshotImage)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/snapshots#SnapshotImage.SCHEMA_REPRESENTATION)
- [Methods](https://developer.android.com/games/services/web/api/rest/v1/snapshots#METHODS_SUMMARY)

## Resource: Snapshot

An snapshot object.

|                                                                                                                                                                                                       JSON representation                                                                                                                                                                                                       |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "id": string, "driveId": string, "kind": string, "type": enum (https://developer.android.com/games/services/web/api/rest/v1/snapshots#SnapshotType), "title": string, "description": string, "lastModifiedMillis": string, "durationMillis": string, "coverImage": { object (https://developer.android.com/games/services/web/api/rest/v1/snapshots#SnapshotImage) }, "uniqueName": string, "progressValue": string } ``` |

|                                                                                                     Fields                                                                                                     ||
|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`                 | `string` The ID of the snapshot.                                                                                                                                                         |
| `driveId`            | `string` The ID of the file underlying this snapshot in the Drive API. Only present if the snapshot is a view on a Drive file and the file is owned by the caller.                       |
| `kind`               | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#snapshot`.                                                                               |
| `type`               | `enum (`[SnapshotType](https://developer.android.com/games/services/web/api/rest/v1/snapshots#SnapshotType)`)` The type of this snapshot.                                                |
| `title`              | `string` The title of this snapshot.                                                                                                                                                     |
| `description`        | `string` The description of this snapshot.                                                                                                                                               |
| `lastModifiedMillis` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The timestamp (in millis since Unix epoch) of the last modification to this snapshot.                |
| `durationMillis`     | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The duration associated with this snapshot, in millis.                                               |
| `coverImage`         | `object (`[SnapshotImage](https://developer.android.com/games/services/web/api/rest/v1/snapshots#SnapshotImage)`)` The cover image of this snapshot. May be absent if there is no image. |
| `uniqueName`         | `string` The unique name provided when the snapshot was created.                                                                                                                         |
| `progressValue`      | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The progress value (64-bit integer set by developer) associated with this snapshot.                  |

## SnapshotType

Define supported snapshot types.

|                       Enums                       ||
|-------------|--------------------------------------|
| `SAVE_GAME` | A snapshot representing a save game. |

## SnapshotImage

An image of a snapshot.

|                                         JSON representation                                         |
|-----------------------------------------------------------------------------------------------------|
| ``` { "width": integer, "height": integer, "mime_type": string, "url": string, "kind": string } ``` |

|                                                            Fields                                                            ||
|-------------|-----------------------------------------------------------------------------------------------------------------|
| `width`     | `integer` The width of the image.                                                                               |
| `height`    | `integer` The height of the image.                                                                              |
| `mime_type` | `string` The MIME type of the image.                                                                            |
| `url`       | `string` The URL of the image. This URL may be invalidated at any time and should not be cached.                |
| `kind`      | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#snapshotImage`. |

|                                                                                            ## Methods                                                                                             ||
|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| ### [get](https://developer.android.com/games/services/web/api/rest/v1/snapshots/get)   | Retrieves the metadata for a given snapshot ID.                                                          |
| ### [list](https://developer.android.com/games/services/web/api/rest/v1/snapshots/list) | Retrieves a list of snapshots created by your application for the player corresponding to the player ID. |