Restore an application snapshot
Roll an application’s files back to a snapshot with POST /v2/apps//snapshots/restore, using the snapshotId and versionId from the list.
POST
Restore an application snapshot
string
required
The API key for your account. You can find this in your account settings.
snapshots:write scope.
Restore Snapshot rolls an application’s storage back to a previous snapshot, replacing its current files with the ones captured at snapshot time. Use it to recover from a bad deploy or accidental deletion. Get the snapshotId and versionId values from List Snapshots, they are not something you construct by hand.
snapshotId is the snapshot name exactly as List Snapshots returns it (the application ID, optionally suffixed with _<runtime> and _<origin>), and versionId must match the S3 version-key format; malformed values are rejected before the restore is dispatched. Restoring does not itself restart the application, run Restart Application afterward if the running process needs to pick up the restored files.
Snapshots (and therefore restores) are only available with an active plan. On workspace-shared applications the caller needs the admin role.
Parameters
string
required
The ID of the application. You can find this in the URL of your application’s dashboard.
string
required
The snapshot
name from the listing (the application ID, optionally suffixed with _<runtime> and _<origin>), passed exactly as returned.string
required
The snapshot’s
version_id, as List Snapshots returns it.Response
string
Indicates whether the call was successful:
success if it was, error if not.Common errors
Related
- CLI:
squarecloud app snapshot restore - SDKs:
api.apps.snapshots.restore()(JavaScript),client.apps.snapshots.restore()(Python),c.Apps.Snapshots.Restore()(Go)

