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": "my-backup-snapshot",
  "tags": {
    "my-tag": "my-tag-value",
    "my-tag-to-remove": null
  }
}'
{
  "created_at": "2019-05-29T05:32:41+0000",
  "creator_task_id": "2358e3b1-5c42-4705-8950-6ddcfc19c3bd",
  "description": "Snapshot description",
  "id": "726ecfcc-7fd0-4e30-a86e-7892524aa483",
  "name": "my-snapshot",
  "project_id": 1337,
  "region": "Luxembourg 1",
  "region_id": 7,
  "size": 20,
  "status": "available",
  "tags": [
    {
      "key": "my-tag",
      "read_only": false,
      "value": "my-tag-value"
    }
  ],
  "task_id": null,
  "updated_at": "2019-05-29T05:39:20+0000",
  "volume_id": "67baa7d1-08ea-4fc5-bef2-6b2465b7d227"
}

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

Examples:

1

region_id
integer
required

Region ID

Examples:

1

snapshot_id
string<uuid4>
required

Unique identifier of the snapshot

Examples:

"726ecfcc-7fd0-4e30-a86e-7892524aa483"

Body

application/json
name
string

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

Examples:

"my-backup-snapshot"

tags
object | null

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.

Examples:
{
"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

Examples:

"2019-05-29T05:32:41+0000"

creator_task_id
string<uuid4>
required

Task that created this entity

Examples:

"2358e3b1-5c42-4705-8950-6ddcfc19c3bd"

description
string | null
required

Snapshot description

Examples:

"Snapshot description"

id
string<uuid4>
required

Snapshot ID

Examples:

"726ecfcc-7fd0-4e30-a86e-7892524aa483"

name
string
required

Snapshot name

Examples:

"my-snapshot"

project_id
integer
required

Project ID

Examples:

1337

region
string
required

Region name

Examples:

"Luxembourg 1"

region_id
integer
required

Region ID

Examples:

7

size
integer
required

Snapshot size, GiB

Examples:

20

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.

Examples:
[
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
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.

Examples:

null

updated_at
string<date-time>
required

Datetime when the snapshot was last updated

Examples:

"2019-05-29T05:39:20+0000"

volume_id
string<uuid4>
required

ID of the volume this snapshot was made from

Examples:

"67baa7d1-08ea-4fc5-bef2-6b2465b7d227"