Method list

Retrieves the list of Snapshot resources in the specified folder.

HTTP request

GET https://compute.api.cloud.yandex.net/compute/v1/snapshots

Query parameters

Parameter Description
folderId Required. ID of the folder to list snapshots in. To get the folder ID, use a list request. The maximum string length in characters is 50.
pageSize The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a nextPageToken that can be used to get the next page of results in subsequent list requests. The maximum value is 1000.
pageToken Page token. To get the next page of results, set pageToken to the nextPageToken returned by a previous list request. The maximum string length in characters is 100.
filter A filter expression that filters resources listed in the response. The expression must specify: 1. The field name. Currently you can use filtering only on the Snapshot.name field. 2. An operator. Can be either = or != for single values, IN or NOT IN for lists of values. 3. The value. Мust be 3-63 characters long and match the regular expression ^[a-z]([-a-z0-9]{,61}[a-z0-9])?$. The maximum string length in characters is 1000.

Response

HTTP Code: 200 - OK

 {
  "snapshots": [
    {
      "id": "string",
      "folderId": "string",
      "createdAt": "string",
      "name": "string",
      "description": "string",
      "labels": "object",
      "storageSize": "string",
      "diskSize": "string",
      "productIds": [
        "string"
      ],
      "status": "string",
      "sourceDiskId": "string"
    }
  ],
  "nextPageToken": "string"
}
Field Description
snapshots[] object

A Snapshot resource. For more information, see Snapshots.

snapshots[].
id
string

ID of the snapshot.

snapshots[].
folderId
string

ID of the folder that the snapshot belongs to.

snapshots[].
createdAt
string (date-time)

String in RFC3339 text format.

snapshots[].
name
string

Name of the snapshot. 1-63 characters long.

snapshots[].
description
string

Description of the snapshot. 0-256 characters long.

snapshots[].
labels
object

Resource labels as key:value pairs. Maximum of 64 per resource.

snapshots[].
storageSize
string (int64)

Size of the snapshot, specified in bytes.

snapshots[].
diskSize
string (int64)

Size of the disk when the snapshot was created, specified in bytes.

snapshots[].
productIds[]
string

License IDs that indicate which licenses are attached to this resource. License IDs are used to calculate additional charges for the use of the virtual machine.

The correct license ID is generated by Yandex.Cloud. IDs are inherited by new resources created from this resource.

If you know the license IDs, specify them when you create the image. For example, if you create a disk image using a third-party utility and load it into Yandex Object Storage, the license IDs will be lost. You can specify them in the create request.

snapshots[].
status
string

Current status of the snapshot.

  • CREATING: Snapshot is being created.
  • READY: Snapshot is ready to use.
  • ERROR: Snapshot encountered a problem and cannot operate.
  • DELETING: Snapshot is being deleted.
snapshots[].
sourceDiskId
string

ID of the source disk used to create this snapshot.

nextPageToken string

This token allows you to get the next page of results for list requests. If the number of results is larger than pageSize, use the nextPageToken as the value for the pageToken query parameter in the next list request. Each subsequent list request will have its own nextPageToken to continue paging through the results.