Skip to main content
PATCH
/
cloud
/
v1
/
snapshots
/
{project_id}
/
{region_id}
/
{snapshot_id}
Update snapshot
curl --request PATCH \
  --url https://api.gcore.com/cloud/v1/snapshots/{project_id}/{region_id}/{snapshot_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "tags": {
    "my-tag": "my-tag-value",
    "my-tag-to-remove": null
  }
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "creator_task_id": "<string>",
  "description": "Snapshot description",
  "id": "<string>",
  "name": "<string>",
  "project_id": 123,
  "region": "<string>",
  "region_id": 123,
  "size": 123,
  "status": "available",
  "tags": [
    {
      "key": "<string>",
      "read_only": true,
      "value": "<string>"
    }
  ],
  "task_id": null,
  "updated_at": "2023-11-07T05:31:56Z",
  "volume_id": "<string>"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

snapshot_id
string<uuid4>
required

Unique identifier of the snapshot

Body

application/json
name
string

Display name for the snapshot (3-63 chars). Used in customer portal and API. Does not affect snapshot data.

tags
UpdateTagsSerializer · object

Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide key-value pairs to add or update tags. Set tag values to null to remove tags. Unspecified tags remain unchanged. Read-only tags are always preserved and cannot be modified.

Examples:

  • Add/update tags: {'tags': {'environment': 'production', 'team': 'backend'}} adds new tags or updates existing ones.

  • Delete tags: {'tags': {'old_tag': null}} removes specific tags.

  • Remove all tags: {'tags': null} removes all user-managed tags (read-only tags are preserved).

  • Partial update: {'tags': {'environment': 'staging'}} only updates specified tags.

  • Mixed operations: {'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}} adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag', preserving other existing tags.

  • Replace all: first delete existing tags with null values, then add new ones in the same request.

Example:
{
"my-tag": "my-tag-value",
"my-tag-to-remove": null
}

Response

200 - application/json

OK

created_at
string<date-time>
required

Datetime when the snapshot was created

creator_task_id
string<uuid4>
required

Task that created this entity

description
string | null
required

Snapshot description

Example:

"Snapshot description"

id
string<uuid4>
required

Snapshot ID

name
string
required

Snapshot name

project_id
integer
required

Project ID

region
string
required

Region name

region_id
integer
required

Region ID

size
integer
required

Snapshot size, GiB

status
enum<string>
required

Snapshot status

Available options:
available,
backing-up,
creating,
deleted,
deleting,
error,
error_deleting,
restoring,
unmanaging
tags
TagSerializer · object[]
required

List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

task_id
string<uuid4> | null
required

The UUID of the active task that currently holds a lock on the resource. This lock prevents concurrent modifications to ensure consistency. If null, the resource is not locked.

Example:

null

updated_at
string<date-time>
required

Datetime when the snapshot was last updated

volume_id
string<uuid4>
required

ID of the volume this snapshot was made from