Skip to content

Snapshot

All operations require authentication.

4 operationsv2/publicCloud/project
Agent setup

List instance snapshotsProduction

GET
/v2/publicCloud/project/{projectId}/compute/snapshot

Returns the snapshots of the project.

Path parameters

projectId
required
string

Project ID

Query parameters

instanceId
stringuuid

Filter by source instance ID

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Snapshot[]successful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the snapshot

currentState
read-only
SnapshotCurrentState

Current state of the snapshot

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the snapshot

id
read-only
stringuuid

Unique identifier of the snapshot

resourceStatus
read-only
ResourceStatusEnum

Snapshot readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
SnapshotTargetSpec

Last target specification of the snapshot

updatedAt
read-only
stringdate-time

Last update date of the snapshot

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/snapshot \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "canBeDeleted": true, "instance": { "id": "00000000-0000-0000-0000-000000000000" }, "location": { "availabilityZone": "string", "region": "string" }, "minDisk": 0, "minRam": 0, "name": "string", "osType": "BAREMETAL_LINUX", "size": 0, "status": "ACTIVE", "visibility": "COMMUNITY" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "instance": { "id": "00000000-0000-0000-0000-000000000000" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z" }]

Get an instance snapshotProduction

GET
/v2/publicCloud/project/{projectId}/compute/snapshot/{snapshotId}

Returns the snapshot image, including its status and the instance it was created from.

Path parameters

projectId
required
string

Project ID

snapshotId
required
stringuuid

Snapshot ID

Response

200Snapshotsuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the snapshot

currentState
read-only
SnapshotCurrentState

Current state of the snapshot

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the snapshot

id
read-only
stringuuid

Unique identifier of the snapshot

resourceStatus
read-only
ResourceStatusEnum

Snapshot readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
SnapshotTargetSpec

Last target specification of the snapshot

updatedAt
read-only
stringdate-time

Last update date of the snapshot

404objectError 404 response

Example uses projectId = string, snapshotId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/snapshot/{snapshotId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "canBeDeleted": true, "instance": { "id": "00000000-0000-0000-0000-000000000000" }, "location": { "availabilityZone": "string", "region": "string" }, "minDisk": 0, "minRam": 0, "name": "string", "osType": "BAREMETAL_LINUX", "size": 0, "status": "ACTIVE", "visibility": "COMMUNITY" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "instance": { "id": "00000000-0000-0000-0000-000000000000" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z"}

Create an instance snapshotProduction

POST
/v2/publicCloud/project/{projectId}/compute/snapshot

Creates a snapshot image of the instance's current disk. Its id can be used as image.id to create a new instance from it.

Path parameters

projectId
required
string

Project ID

Request body (required)

targetSpec
required
SnapshotTargetSpec

Desired target specification for the snapshot to create

Response

200Snapshotsuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the snapshot

currentState
read-only
SnapshotCurrentState

Current state of the snapshot

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the snapshot

id
read-only
stringuuid

Unique identifier of the snapshot

resourceStatus
read-only
ResourceStatusEnum

Snapshot readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
SnapshotTargetSpec

Last target specification of the snapshot

updatedAt
read-only
stringdate-time

Last update date of the snapshot

409objectError 409 response

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/snapshot \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "canBeDeleted": true, "instance": { "id": "00000000-0000-0000-0000-000000000000" }, "location": { "availabilityZone": "string", "region": "string" }, "minDisk": 0, "minRam": 0, "name": "string", "osType": "BAREMETAL_LINUX", "size": 0, "status": "ACTIVE", "visibility": "COMMUNITY" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "instance": { "id": "00000000-0000-0000-0000-000000000000" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z"}

Delete an instance snapshotProduction

DELETE
/v2/publicCloud/project/{projectId}/compute/snapshot/{snapshotId}

Deletes the snapshot image.

Path parameters

projectId
required
string

Project ID

snapshotId
required
stringuuid

Snapshot ID

Response

200Snapshotsuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the snapshot

currentState
read-only
SnapshotCurrentState

Current state of the snapshot

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the snapshot

id
read-only
stringuuid

Unique identifier of the snapshot

resourceStatus
read-only
ResourceStatusEnum

Snapshot readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
SnapshotTargetSpec

Last target specification of the snapshot

updatedAt
read-only
stringdate-time

Last update date of the snapshot

404objectError 404 response
409objectError 409 response

Example uses projectId = string, snapshotId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/snapshot/{snapshotId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "canBeDeleted": true, "instance": { "id": "00000000-0000-0000-0000-000000000000" }, "location": { "availabilityZone": "string", "region": "string" }, "minDisk": 0, "minRam": 0, "name": "string", "osType": "BAREMETAL_LINUX", "size": 0, "status": "ACTIVE", "visibility": "COMMUNITY" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "instance": { "id": "00000000-0000-0000-0000-000000000000" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z"}